Does D have too many features?
Dmitry Olshansky
dmitry.olsh at gmail.com
Sat Apr 28 23:03:43 PDT 2012
On 29.04.2012 5:06, bearophile wrote:
> Jonathan M Davis:
>
>> * foreach_reverse is essentially redudant at this point (not to mention
>> confusing if combined with delegates), since we have retro.
>
> retro() can't replace foreach_reverse until the front-end
> demonstrability produces asm code equally efficient.
bleh C++ doesn't have reverse loop in the language. all there is
rbegin() and rend(). And this attitude reminds me of the old STL days.
What's wrong with you people? Am I back to 90s ?
> Loops _must_ be fully efficient, they are a basic language construct,
> this is very important. Even foreach() is sometimes not equally
> efficient as a for() in some cases...
>
Doesn't have to do anything with the LANGUAGE.
Yesterday I tried GDC. Damn I didn't regret it :)
>
>> * I hate C style struct initializers and would really like to see them
>> go, but
>> for reasons that I don't understand, people actually use them rather
>> than using a proper constructor call,
>
> For single structs I prefer D-style initialization.
> But take a look at this code, if you replace those C-style initializers
> with D-style, even using aliases to shorten the code to single letters,
> that data section becomes more noisy:
> http://rosettacode.org/wiki/Ray-casting_algorithm#D
>
Such code (tables) is usually generated anyway.
[snip reasonable parts ;)]
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list