digitalmars.D - Ten Things I Like about D
- "Daren Scot Wilson" <darenw darenscotwilson.com> Jun 02 2013
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Jun 02 2013
- "bearophile" <bearophileHUGS lycos.com> Jun 03 2013
- "Suliman" <bubnenkoff gmail.com> Jun 06 2013
"Daren Scot Wilson" <darenw darenscotwilson.com> writes:
What I like about D... 1) It is a compile-to-machine language, meaning high performance for general CPU code. 2) It can link to any library offering a C-style API, for example, OpenGL. It is good that people are providing .d files with the necessary declarations, but if I can't find one, no big deal. I can write my own. (But I rarely need more than a fraction of most specialized libraries, so I have no .d files to offer for the benefit others. If someone nags me, though, I would.) 3a) Unicode for identifiers. I saw the discussion recently (May 30th or so) and cast my vote in favor of allowing unicode characters for identifiers (and of course comments and string literals.) I never knew any language allowed non-ASCII for variable or procedure names, until I played with Go about two years ago. I thought, cool, as a physicist/engineer I can use lambda for wavelength, capital omega for longitude of the ascending node, etc. 3b) More Unicode for identifiers: It's important to allow the Germans, the French, the Japanese who write code for their own personal research, or in-house code for their own company, to freely use the language they know best. I can see skipping Arabic, Hebrew and other right-to-left languages, since I can't picture how source code would be formatted or written without some brain-twisting. (I wonder how Arabic programmers deal with Python?) But then, this is a topic I'm ignorant about. Chinese and other languages with thousands of complicated-looking characters, whew, I don't know about those either. But there's just no reason to force the Germans to give up "ü" to write "ue" just to please the American-invented ASCII alphabet. (And maybe we could have string literals surrounded by a heterogenous pair „...“ or «...» instead of the ambigous identical twins "" (ascii 0x22) every language uses today?) 4) Ranges instead of iterators. I'm undereducated about computer science, and have no profound enlightening thoughts about this. I'm just a practical graphics and physics guy who can only say I just like it better this way, compared to C++. 5) No more compiler-molassis like #include and bolted-on template syntax. All languages, and it seems like *all* languages, but for C and C++, have some kind of module or package or something for making use of already-written libraries and components. Well, no, I remember (?) fooling around with Sather (or Sather-K) in 1998, and it too used textual inclusion of files, not unlike #include. 6) Fast compiling. Like Ada95, Modula, Java, Go, Fortran, and any language. No doubt due partly for reasons covered in #5, but also any language with some kind of sense to its syntax will compile "fast". I like sensible syntax, especially with associative arrays, overloaded functions, and... well, everything beyond the primitive concepts in compile-to-machine languages. 7) Speaking of sensible syntax, C++ is very difficult to write tools for. Example: Once upon a time, I say a class Alpha that contained within it curly declaration friend class Beta. I go look for Beta - in the same header, and it declares friend class Alpha. Each also had a member pointer to an instance of the other. Cute. I wonder what it means? Maybe is part of some "design pattern"? So I slapped together a tool using Python and Ack (betterthangrep.org) to search for other cases like that. I was lucky that our source was closely adhering to a standardized style, but with templates, macros, and all manner of wickedness allowed by C++ in general, I can see how creating a c++ static analysis tool could be a rough adventure. 8) Cool, I can write #!/usr/bin/env rdmd and have an executable script I can start from the command line, but run at compiled-code speed. (Except for the time rdmd takes to compile it, but plenty fast for the intended use-case.) 9) Unit tests built into the system. Made easy enough for lazy programmers like me to actually write them! 10) Andrei Alexandrescu's book TDPL is one of the greatest works of literature ever conceived by mankind. The Baghavad Gita, Shakespeare, Hemingway, etc are all going to fall away behind this marvelous work. Therefore, it makes sense for everyone to use D for all programming tasks, so that this great book will be of benefit to all!
Jun 02 2013
Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/2/13 11:28 PM, Daren Scot Wilson wrote:What I like about D...
Would be great if you pasted that all in a blog entry. Though I suggest that comparisons against The Bard, Bhagavad Gita etc. shouldn't make the editorial pass. (Also, an Amazon review would be awesome.) Anyhow, this was a great read. Thanks! Andrei
Jun 02 2013
"bearophile" <bearophileHUGS lycos.com> writes:
Daren Scot Wilson:3a) Unicode for identifiers. I saw the discussion recently (May 30th or so) and cast my vote in favor of allowing unicode characters for identifiers (and of course comments and string literals.)
I think that currently Unicode in identifiers becomes almost tolerable if your programming language has ASCII equivalents for all the Unicode symbols, like Fortress. Bye, bearophile
Jun 03 2013
"Suliman" <bubnenkoff gmail.com> writes:
On Monday, 3 June 2013 at 03:28:52 UTC, Daren Scot Wilson wrote:What I like about D...
Russian translation http://dlang.ru/10-prichin-pochemu-ya-lyublyu-yazyk-programmirovaniya-d
Jun 06 2013