Should this work?
Peter Alexander
peter.alexander.au at gmail.com
Sat Jan 11 03:29:23 PST 2014
On Saturday, 11 January 2014 at 02:15:15 UTC, Manu wrote:
> That is the world today, that is where the bar is. D will be
> wildly
> successful on the day that programmers that have never seen it
> before can
> come along, effortlessly write whatever code they're trying to
> write,
> offered useful help by the compiler along the way, walk away
> feeling really
> smart and happy with their experience.
That is not a D I want to be part of.
Let's give a container library to someone that knows nothing of
containers, they'll say "what's with all these 'red-black trees'
and 'linked lists'? I just want to store a bunch of numbers!", so
you streamline the design to one container that does everything
in O(n) time or better. Much simpler than the user having to
learn anything, and they can get things done effortlessly and
feel smart and happy.
Let's get rid of value types and just heap allocate everything in
the GC and make copies on every write. Much easier than learning
about object lifetime and mutability.
Let's get rid of static typing and make D dynamically typed. Much
easier than learning about type systems.
That's what D becomes if users aren't willing to RTFM. There are
trade-offs in language/library design and D has traded some
convenience for efficiency. You cannot have the high-performance
and powerful modelling capabilities of ranges with unbounded
convenience.
I'm not saying convenience isn't important, but things like
ranges have subtleties, and need those subtleties to achieve the
performance/power they were designed for. If you want that,
you'll need to bite the bullet and learn, if you don't, then just
go and write Python.
<3
More information about the Digitalmars-d
mailing list