Associative arrays
Chris Piker
chris at hoopjump.com
Tue May 18 10:18:28 UTC 2021
On Tuesday, 18 May 2021 at 09:41:06 UTC, Ola Fosheim Grostad
wrote:
> It could look the same, but long[string] would now be a
> shorthand for std.xyz.Map!(long,string) or something like that
> instead of a special case.
Hum, that's unfortunate.
Though it's a separate issue, I think this means that the error
messages generated by AA associated code would become neigh
unreadable, just like many error messages involving templates.
I'd probably avoid using a library implementation in that case,
because the usability of a construct is tied to the debug-ability
of a construct. Unless I'm mistaken*, the hash function used to
generate the AA would become part of the data type and thus the
decent into Type Hell(tm) would begin...
Maybe in a few months I'll have a different opinion, but D
template error messages really made last week more difficult at
work, so any library function that encourages dmd to pump out
more text-walls is something I'll try to avoid using.
--
*always likely
More information about the Digitalmars-d
mailing list