[bitc-dev] Syntax: procedure call.
Sandro Magi
naasking at higherlogics.com
Mon Apr 12 11:31:56 PDT 2010
On 12/04/2010 2:49 AM, Jonathan S. Shapiro wrote:
> Yes. And the syntax is consistent with higher-order kinding, which is
> good. There is just something about it that strikes me as ugly. can't
> quite say why that is.
>
> Example:
>
> struct S('a, 'b, 'c) {
> ...
> }
>
> There is just something about that which doesn't work for me visually.
Problems only arise with nested type signatures. They become unreadable
quickly with any sort of bracketed form.
> I suspect, mostly, an issue of tradition. And perversely:
>
> struct S 'a 'b 'c {
> ...
> }
>
> doesn't make me twitch the same way. I have no idea why.
>
> Does the damned syntax actually need to be consistent? :-)
SML/OCaml aren't consistent here, where function application is the
reverse of type constructor application, so it's not strictly necessary.
I like the idea that the type and expression terms have the same form,
but not sure how it'll work out in practice. It might turn out to be
visually confusing when looking at raw program text, unless types and
terms are well separated as in Haskell, ie. type signature on its own
line started with "::".
If you have an expression mixing type signatures and terms, it could be
very confusing to pick out the type signatures and thereby figure out
the structure of the code.
Sandro
More information about the bitc-dev
mailing list