[just talk] what if implicitly typed literals were disallowed
Adam D. Ruppe
destructionator at gmail.com
Wed Oct 24 16:50:06 PDT 2012
On Wednesday, 24 October 2012 at 23:15:35 UTC, H. S. Teoh wrote:
> there might be instances where you want to refer to the
> built-in types. Having the keywords around (perhaps suitably
> renamed) seems to be needed still.
Oh yes, definitely. I'm thinking of making them _int or __int
rather than int, just freeing up the common words.
Heck I'd like to have int and char available as variable names
anyway so hey.
> And what about _transparent substitution_ of AA literals for a
> custom hash implementation?
yessss
> You could even make std.container take AA literals
> as initializers for hashes, and have CTFE transform that into
> the
I think this would work today actually... just define a CTFE
constructor, similar to std.conv.octal, though it'd still have to
be consistent types; T[V] where T is always the same, so not
quite suitable for named param calling or json.
> You might even be able to make BigNum literals without using
> strings (or am I dreaming too much about this one?).
this should definitely be possible if the literals didn't
overflow.
More information about the Digitalmars-d
mailing list