On Tuesday, 30 August 2016 at 08:34:23 UTC, eugene wrote:
On Tuesday, 30 August 2016 at 08:00:35 UTC, Markus wrote:
D has its roots in C++ (and C) but is full fledged now and should
represent its features and strength WITHOUT continuously
referencing C++ and without this repetitive "without mistakes".
...
From my point of view this is misleading for people coming to D
first time.

i think it is to invite C\C++ developers to use D instead of what they now use. I dont think D currently can supersede neither C\C++ nor java, since both sides have a huge amount of libs, frameworks as it's a key why they are still highly used, though java lacks in speed of evolution and C++ is becoming more complex and C lacks abstractions like OOP

One thing that put me off looking a D again for a long time was the code example on the front page.

Perhaps like many people, I like C, I liked early C++ as being a much better C, but I look at "Modern" C++ with dismay. I liked C and early C++ because they were systems programming languages, where you could always see and understand the mapping from the language to the underlying machine, both for instructions and memory usage. Modern C++ has lost this. It's no longer considered "best practice" to write code that maps directly to simple machine constructs and use libraries when you want something "bigger". I look at C++ with dismay now. Everything they added works by "magic" or template "tricks" where you have little or no idea how the underlying code works or how memory is used without going into real depth.


This is why I've looked for a new language and I think D fits that quite well. It's not lost the plot like C++ seems to have done. it's simple to write and understand, but it has higher level constructs when you want them.

This is why the example on the front page put me off for a long time :-

    stdin
        .byLineCopy
        .array
        .sort!((a, b) => a > b) // descending order
        .each!writeln;

It makes the language look like some weird high level functional language where you don't ask how it works and you shouldn't care how it maps to the machine instructions and memory.

I realize that the same is actually fairly simple using ranges etc. and have no complaints about the code or having it as a sample. But it reminded me of haskel and functional programming, and memory management where it all just works "by magic" and you're patted on the head and told not to worry about it.

I feel this is a good example for later on, and I'm in no way complaining about the code but a very bad thing for the first thing you see on the front page.

I'm willing to admit I might be the only one :P But I'd much rather see the "better C" side as my first view of typical D code than this.

Reply via email to