But it *doesn't* work just fine without the alias.  =P

There are very specific things that *make* it work,
so I couldn't figure out if it was ever *supposed* to work.
Either the bug was the fact that it worked, or the bug was the fact that it didn't work.

immutable(char)[immutable(char)[]][] does not work at all.(*I* can't make it work)
alias currently (2.060) does not seem to work with AA at all.
auto currently does not work with AA.
array literals currently do not work with AA.

you cannot do string[string][] thing = [["t":"f"]];
but you *can* do string[string][] thing; thing = [["t":"f"]];//on the same line, no less...

you cannot do alias string[string][string] Dict;
and there doesn't seem to be a workaround.

you cannot do auto Dict = [["a":"b"]];
and there doesn't seem to be a workaround.


D really is amazing in that these features exist.
Work out all of the minor bugs and work on Documentation a little and we are in
"why the (insert explitive here) *aren't* you using D?" territory.

I do however find it unacceptable that a major language feature(AA) does not play nice
with other language features(auto, alias, array literals).

I think that this bug (8557, or 5448 if they are too similar) should be upgraded in severity.
There is even a patch for 5448 that (seems to have) languished.

We should either fix AA so that it works properly, drop it completely, or(less acceptable IMO)
add a huge (See BUG 8557, 5448) to the top of http://dlang.org/hash-map
(But that's just my opinion)

What do you think?

On Sat, 18 Aug 2012 03:59:44 -0500, Era Scarecrow <rtcv...@yahoo.com> wrote:

On Saturday, 18 August 2012 at 07:54:18 UTC, 1100110 wrote:
Is it supposed to do that or not?  that's what I can't decide...  =P

It doesn't seem to like templates either. A tls variable, Tuple, or a Variant seems to be the only way that
string[string][] works.  It wants a double?  a number anyways.

Not it's not suppose to do that. An alias is just short hand for the longer version. If you can use it properly without the alias (but not with) than you have your answer. Fully expanded it's hard to read:P

  immutable(char)[immutable(char)[]][]

It's like optimizations, they are added that change your code to be smaller, faster, inlined, using hardware tricks; But the usage and behavior of the code remains unchanged.


--
Using Opera's revolutionary email client: http://www.opera.com/mail/
ME: Opera, you ain't 'revolutionary'. That's like Apple claiming to be 'innovative'.
Geez...

Reply via email to