On Sunday, 29 April 2012 at 06:11:00 UTC, Era Scarecrow wrote:
My list:
* I'd start with getting rid of foreach completely. (not just
foreach_reverse).
C++ was criticized for a long time for NOT having foreach in
the language. Now they have
http://www2.research.att.com/~bs/C++0xFAQ.html#for. Also
people were so desperate to gave it that even this
http://www.boost.org/doc/libs/1_49_0/doc/html/foreach.html was
considered a nice addition to boost (and still part of it).
Obviously somehow you want to go into the opposite direction.
Beats me.
If it simplifies code, makes it easier, and is more
consistent, having it is better than not having it. Like walter
said in one of the recent videos (going native 2012) regarding
having an assembler in a language: 'When you need it, you got
to have it'. True most features can be re-written as work
arounds, but if you don't have to then why insist on it?
Backtracking by removing key features which make the language
pleasant may throw us back into the C and C++ days. Yes you can
do full memory management yourself, and use pointers and pass
it's size to functions. We have fat pointers, so why insist on
backtracking? At the worst case if it isn't breaking the
language leave it alone. If you have good reasons for it,
explain them in detail. At best those of us who know better
will laugh and move on.
One of the ideas that I see regularly thrown around is to remove
more and more things from the core language and put them in the
libraries, because it's possible, and it would make for a thinner
languages.
Well, these are good reasons to do it, but there are many good
reasons NOT to do it.
Some general reasons:
1. code is uglier when in the libraries. One must add imports,
and template code is uglier and harder to write than plain old
code.
2. template code makes bigger size executables
3. error messages are more cryptic
4. we like to think that putting things in the library helps
changing things easier, but my opinion is, changing fundamental
structures in the standard library may actually break more code
than changing them in the core language, because of the heavy
interplay between modules, and also because the standard library
is probably less well tested (in terms of number of regression
tests) than the core language.
5. it makes work much harder for tools and parsers
Specific to D:
6. my impression is, from what I've seen in Bugzilla, that Phobos
bugs tend to stay around longer, because there is not enough
workforce on it
These a lot of drawbacks in my opinion. Basically, one of the
main reasons the D code is clean, is because the core languages
features so many useful things, with a nice, clean syntax. Moving
them to the standard library will automatically make the code
uglier and the language harder to use.