head and tail are good variable names, so I'd rather they didn't
become reserved words.
But I've no problem with headconst and tailconst.
Only ... would that mean we'd then also have to have a tailtailconst?

agreed, no need to make tail/head reserved words.
i thought 1 level of "tailness" is enough to cover 99% of cases...
can you give a use case for "tailtailconst" that can't be resolved with
a combination of the const parens and tailconst?

I think tailconst is too long a word for something that will probably be
used pretty frequently. If you think of C++ the most commonly used
const with pointer types is "const T* foo;" which means tail const.
The equivalent with a D class would be come "tailconst T foo" and you'd
have cases where "tailconst" appears 5 times in a function signature.
tailconst Z some_func(tailconst A a, tailconst B b, tailconst C c,
tailconst D d) { ... }
Ick.
How about shortening it to just "tconst"? And there could be ttconst,
and tttconst as needed. Similarly "hconst". And still the const(T)*
syntax can be a synonym for tconst(T*).
Kinda reminiscent of cons, cdr, cddr, cdddr, from lisp, which really are
basically serving the same purpose.
--bb

You sick puppy. If I hadn't seen your many other wonderful posts I'd assume you
were trolling with that one.
Keyword profilerifation is a classic language design anti-pattern.
If you must go down that route then your "const" should be parameterisable. I'm
not terribly keen on that idea either.

become reserved words.
But I've no problem with headconst and tailconst.
Only ... would that mean we'd then also have to have a tailtailconst?

i thought 1 level of "tailness" is enough to cover 99% of cases...
can you give a use case for "tailtailconst" that can't be resolved with
a combination of the const parens and tailconst?

used pretty frequently. If you think of C++ the most commonly used
const with pointer types is "const T* foo;" which means tail const.
The equivalent with a D class would be come "tailconst T foo" and you'd
have cases where "tailconst" appears 5 times in a function signature.
tailconst Z some_func(tailconst A a, tailconst B b, tailconst C c,
tailconst D d) { ... }
Ick.
How about shortening it to just "tconst"? And there could be ttconst,
and tttconst as needed. Similarly "hconst". And still the const(T)*
syntax can be a synonym for tconst(T*).
Kinda reminiscent of cons, cdr, cddr, cdddr, from lisp, which really are
basically serving the same purpose.
--bb

You sick puppy. If I hadn't seen your many other wonderful posts I'd assume
you were trolling with that one.
Keyword profilerifation is a classic language design anti-pattern.
If you must go down that route then your "const" should be parameterisable.
I'm not terribly keen on that idea either.

Heh. Well I'd prefer the const*(T), const**(T) thing I posted
previously. But if people don't go for that I'd rather at least have
short keywords rather than a beasts like "tailconst" and
"tailtailconst". :-)
--bb