Declaring Ref Variables Inside Function Calls

bearophile bearophileHUGS at lycos.com
Tue Mar 31 23:29:21 PDT 2009


Andrei Alexandrescu:

>D is at fault because it called typelists tuples. I told Walter not to, and he went ahead and did so anyway. Now we're living with the consequences.<

I see, and you are right. Then why not rename tuples of D2 to a more correct name (typelists)? Being D2 in alpha still there's time to rename invariant as immutable, tuples as typelists... :-) Giving the right names to things is important.


>I added a few (soon to be released).<

May I ask what ones?

My Records (of D1) have:
- attribute length
- opCmp that uses a recursive structCmp() that works even with nested normal structs tpp :-)
- opEquals
- toHash (this too is recursive nested normal structs too)
- opIn_r
- toString
- opCat, that attaches a Record to another Record/generic struct, creating a new Record.

All that is useful. This allows them to work almost as Python tuples. But Record/record doesn't support a good unpacking syntax, of course. You may need compiler support for this.

Bye,
bearophile



More information about the Digitalmars-d mailing list