Andrei Alexandrescu, el 31 de marzo a las 18:42 me escribiste: > Leandro Lucarella wrote: > >Andrei Alexandrescu, el 31 de marzo a las 17:55 me escribiste: > >>>But in Python or ML, no question. I'd happily write a function that > >>>returns (2, 4.2) without giving it much thought. Now perhaps cogent > >>>arguments like "blech" and "belch" can convince me that I should > >>>embrace the Tuple!(int,float) and use it everywhere, just like I'd use > >>>tuples in Python and ML, but so far I'm not convinced. > >>>To me it seems to be in the same league as int[] vs std::vector<int>. > >>>int[] -- great I'll happily use that everywhere. std::vector<int> > >>>kind of a pain, use begrudgingly as needed. > >>Well I think a language can only have so many built-in types. We can't > >>go on forever. > >You don't have to. There are very few types that are extremely useful to > >build up things having a good syntax. I think Python got this right: > >tuples, lists, hashes. That's all you need as first class citizens > >(speaking of "containers"). I think D is only missing tuples (dynamic ^^^^^^^ > >arrays works just fine as lists in D). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > So we must add lists too.
Are you ignoring what I'm writing on purpose? =) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- He used to do surgery On girls in the eighties But gravity always wins