Is D an Underrated Programming Language?
Nerval's Lobster writes: While some programming languages achieved early success only to fall by the wayside (e.g., Delphi), one language that has quietly gained popularity is D, which now ranks 35 in the most recent Tiobe Index. Inspired by C++, D is a general-purpose systems and applications language that's similar to C and C++ in its syntax; it supports procedural, object-oriented, metaprogramming, concurrent and functional programming. D's syntax is simpler and more readable than C++, mainly because D creator Walter Bright developed several C and C++ compilers and is familiar with the subtleties of both languages. D's advocates argue that the language is well thought-out, avoiding many of the complexities encountered with modern C++ programming. So shouldn't it be more popular?
The languages with the biggest gains this time around include JavaScript, PL/SQL, Perl, VB, and COBOL. (Yes, COBOL.) The biggest drops belonged to the six most popular languages: Objective-C, C, Java, C++, PHP, and C#.
What is the signal to noise ratio for these statistics?
I never understood what D offered that wasn't offered elsewhere. The nice thing (and terrible thing) about C++ is there are several compilers available for it.
“Common sense is not so common.” — Voltaire
What kind of complexities has modern C++?
... is that they need to be better than old ones. Not just objectively better, but measurably better. And not just measurably better, but with enough margin as to offset the cost of learning a new language... I'm not going to ditch C++ just to learn D unless someone is paying me to. Show me the money!
Which has more power: the hammer, or the anvil?
I guess the users of languages don't like readable, simple, or maintainable code.
Confirmation!
Your ad here. Ask me how!
Perl; a language whose next big version has been stuck in Wall's development hell since iOS was just an OS run on routers.
PL/SQL; a SQL variant whose idiosyncratic syntax qualifies you to write code for systems built by your father.
Cobol; It's fucking Cobol.
Any remaining faith I had in the Tiobe index is dead.
is universally underrated. Everybody needs more D.
So shouldn't it be more popular?
FTA:
"D offers compilers for all three platforms (Windows, Mac and Linux) as well as FreeBSD."
"There's a D package registry that currently lists over 400 third-party packages."
That pretty much sums it up.
/ All three platforms!
Jeezus fuck. Its bad enough that we get Dicevertisments, but Diceverticements with Campaign ID's on them?
Anyway this is the direct link to the D Language
I am Slashdot. Are you Slashdot as well?
Delphi is good... In fact much better (asm support, low level access, compiled to machine code) than even .NET VB
Niche in the job market thought!
Cobol, ABAP, ADA - that's the future. & Fortran
I'd give it a D+
I live in constant fear of the Coming of the Red Spiders.
I ran into compiler bugs (including segmentation faults) within the first hour of playing with it. So I gave up.
... but I still think the rankings here are just about meaningless.
Peace, or Not?
#29, as an example, is Visual FoxPro.
Draw your own conclusions.
D# as well.
And yet very few switch
Should be, but it isn't.
Here are couple of reasons why (IMHO):
1. The main compiler is not free-software (as in freedom).
The compiler package (called 'dmd' [http://dlang.org/download.html]) has a non-free license,
and regardless of any wishi-washi explanations about front-end/back-end freedom, the fact is - it is not free, and will never be included in any distribution's main repository.
2. The free-software compilers (GDC, based on GCC and LDC, based on LLVM) are always lagging behind in features and compatiblity.
Walter Bright and Andrei Alexandrescu (the two lead developers) focus mainly on DMD, and so the free-software version will never catchup.
3. Building the compiler and the 'standard library' (which was itself a moving target up until recently) is done with really broken 'makefile' system, which requires one to put things in specific directories. Not fun for package maintainers, or for people wanting to build the lastest versions. Time to move to CMake (or autotools).
4. poor eco-system and package-manager. There is 'dub' (http://code.dlang.org/) but it is barely useable in the real-world. For example, the slightest error in the 'package.json' file of a package, and not only nothing works, but also the error messages are next to useless.
5. Less-than-great platform support. Despite claims to supporting Windows,Linux and FreeBSD - it seems some compilation/linking things are not functional on Linux (haven't tested FreeBSD). There's seem to be a big focus on Windows, and little motivation from the top-brass to give a 'push' to make it work perfectly on Linux.
6. A pet-peeve: The 'string' type is very annoying. Regardless of how marvelously it is engineered to fit perfectly within the D-language paradigm, using it is a pain, especially when needing to pass it around or modifying it.
An example is http://stackoverflow.com/questions/20747893/convert-auto-string-to-char-in-d
That being said,
The compiler 'dmd' is blazingly fast,
and once everything is setup correctly (and if one ignores the non-free issue), then programming in D is so much fun! It really feels like this: http://xkcd.com/353/
and I liked it, until I tried to deploy it. I think D could really use some more documentation on deploying applications written with it outside of the systems applications. I tried making a desktop application (opengl based) with it and found it extremely difficult to deploy to other machines let alone Mac OSX. But then again, it could have just been my naiveté.
... but unheard of, as well
extremely relevant
The deletion ninjas on Wikipedia won't even let nim have it's own article. So D has a leg up on at least one "next-gen" language.
I am becoming gerund, destroyer of verbs.
Perl went up in the ratings!
There is no God, and Dirac is his prophet.
Who knew that PL/I was still a thing? Hell, even IBM is releasing a compiler update for this language. Somehow it is about as popular as D.
the growth in cynicism and rebellion has not been without cause
>What kind of complexities has modern C++?
1. C++ still doesn't let you query a C-style array to determine its size, even though that functionality is tracked in dynamic arrays anyway, and can be calculated from staticly defined arrays within their own scope.
So every function using C-style arrays must also pass in a size_t holding the array size. This hurts readibility by wasting room on the parameter list, and exposes you to buffer overflow errors.
Legal:
int arr[10];
for (int i : arr) cout i;
Illegal:
void write_array(int arr[]) { for (int i : arr) cout i; }
STL arrays and vectors are obviously better, at the cost of decreased code readibility. Square bracket accesses are easier to read than .at()s everywhere.
2. Strings. Even with the string type, it is still shitty to use, still has terrible support, and you still have to use the c library string.h for some functionality since they've been too lazy to rewrite all of them into the C++ standard library. This means that people wanting to use the C++ string class still need to know the C way of doing things, and are still vulnerable to the same off by one errors that have been around for decades.
3. Almost no reflection capabilities.
4. The language still enforces rather idiotic rules about class and function definitions that modern languages have done away with, and for the better. It's not like putting #ifdef guards on your code is difficult, but in these modern times it should not be necessary. And forward declarations are a way of saving compiler time at the expense of programmer time. This is the opposite of what should be happening. Compilers are there to make programmers' work easier, not the other way around.
5. C++11 and later has made great strides in simplifying the life of programmers, but its cruft accumulation shows.
In fact it is 25% better than C.
Perhaps they should call it :D. At least it would seem more friendly.
Proverbs 21:19
... many others, including OpenEdge ABL, Swift and not to mention SAS - the latter being billed by Wikipedia as "a graphical point-and-click user interface for non-technical users."
The D horse is dead. Really. Stop flogging it.
I can accept there's a shattered dream here. We all wanted D to be the language C++ was not (20 years ago) but it's just not turned out that way. That's life. Get over it. Beautiful or flawed - it's resigned to the history books.
While some programming languages achieved early success only to fall by the wayside (e.g., Delphi)
It seems more like both Object Pascal and Pascal are underrated. Object Pascal and Pascal each rank higher than D on the TIOBE index individually and combined they rank 10th (1.507%).
It's a shame more people don't use Object Pascal. I find it to be quite elegant, particularly with the recent language additions in the latest Delphi compilers. I still haven't seen anything beat Delphi for RAD development.
I'd publish a paper, "C syntax considered harmful" with roughly the same kind of rationale as the "Goto considered harmful" paper.
I've looked at D before. It looks promising, and I've considered using it. The reason I don't is a bad reason, but it's the most common bad reason: legacy code.
I have two hundred and sixty four thousand lines of code in my personal project/library archive (my own code, not counting custom versions of external packages like openssl and portaudio), all in C/C++, all with a unified build system, that's been ported and debugged on serveral platforms. Every new project I start uses those core libraries and header files. When I think about switching to a new language, my biggest concerns are how new code will integrate with my existing, how the new language will make use of my existing libraries, and how to remain productive in a dual language environment. The long term gain might eventually make it worthwhile - but it might also just cost me time should the new language die out or not support a platform I need it to.
I simply can't justify the gamble.
Alter Aeon Multiclass MUD - http://www.alteraeon.com
What platform CAN'T you target with it? Pretty much everything/anything http://www.embarcadero.com/pro... - & you're right on inline assembly (which from Delphi XE3 onward, you have that option again as you did in say, Delphi 2-7).
Circa 1997-1998, what took me from C/C++ & VB (my "then favorites")? Delphi! Sure - I did a lot of C++ or VB (even Access) projects, but nothing touched Delphi to get C++ (heck, better, proof's below) power & speed + abilities (except for multiple inheritance model)... & to build it as fast/easy as VB too?? You couldn't TOUCH that combination!
What else convinced me? A test resultset from (of all places) "VBPJ" (Visual Basic Programmer's Journal) issue Sept./Oct. 1997 "Inside the VB5 Compiler"...
There, I saw Borland Delphi LITERALLY "knock-the-chocolate" outta MS' offerings, overall, in performance...
Specifics below (the most important, overall? Again - imo @ least - What they ALL do - math & strings!):
---
STRING SUITE:
Delphi = .275ms .500ms
MSVC++ =
MSVB = 4.091ms
---
MATH SUITE:
Delphi = 1.523ms
MSVC++ = 2.890ms
MSVB = 7.071ms
* AGAIN - note what I said above? Even while I was a HUGE fan of MS' Visual Studio?? I couldn't "argue with the numbers" here, & gravitated towards a BETTER coding environs in Delphi, by far, for performance alone!
---
API GRAPHICS METHODS SUITE:
Delphi = .269ms .293ms
MSVC++ =
MSVB = 292
---
TEXTBOX FORM LOADING SUITE:
MSVC++ = .012ms .069ms .072ms
Delphi =
MSVB =
---
ACTIVE X FORM LOADS:
MSVB = .114ms .495ms .778ms
Delphi =
MSVC++ =
---
NATIVE TO LANGUAGE GRAPHICS METHODS SUITE:
MSVC++ = .293ms .455ms .503ms
MSVB =
Delphi =
---
In the 6 tests given, Delphi won the majority (overwhelmingly in fact, in what ALL PROGRAMS DO, math & strings work)...
* "Argue with the numbers..."
(I couldn't... & switched to it as my primary personal favorite development tool, & haven't switched since!)
APK
P.S.=> Between being able to target *ANY* major player hardware platform there is, AND speed + abilities that either rival OR EXCEED those of MSVC++? Hey - can you blame me for liking Delphi & Object Pascal, the best?? apk
'D' was somewhat appealing until C++11 was released and support started. That removed any core feature advantages 'D' had.
The whole mess of 'D' having automatic garbage collection as part of the language turned systems programmers who the language is supposed to target and also makes the language much more difficult to implement. Yes the compiler is easier to write but 'D' is much heavier than C++ feature wise erasing any advantage it may have had on the compiler side.
So other than compilation speed what 'D' offers is marginally nicer than C++ but brings along with it a bunch of baggage, limited platform support and some very questionable engineering decisions.
I personally would rather see C++ resyntaxed so that it's easier to compile. Unfortunately that would break source compatibility and have a bunch of other issues as well.
C++ seems better, but still mediocre. I guess I'll stick with the one and only A Programming Language
The D language creator creator Walter Bright doesn't start manufacturing blue meth with a former student or referring to himself as "Heisenberg" I think I am ok with this.
It's actually in process of feature freeze for 1.0 release right now and it's usable enough for Mozilla to be developing their new layout engine in it, but do tell us more about all you've ascertained by looking at their website's front page.
I don't think so. The author of the language failed the very first requirement of creating a new programming language, which is to give it a unique name. You can't call languages, C, D, or R any more. You just can't. You need to demonstrate that you give a shit.
But people keep doing it. We will soon have multiple languages named after the same single alphabetical character. Any language named after a single letter must therefore be ignored......
If D had garbage collectors as advanced and scalable as Java then it would be appropriate for even the largest projects.
It doesn't.
No one (except maybe .net) has caught up with Java on having a scalable garbage collector. Java's isn't perfect, but it's tunable too.
Similarly, java makes multithreaded/multiprocessor programming much safer than almost anything else. You can mess with objects in globally visible variables from multiple threads perfectly safely in Java. With or without garbage collection, that's very hard to do from C++11, I have no idea about D here...
So until other projects catch up on these sorts of basics people will stick to the engines that do the basics well. Having a great language is convenient, but it's not as important as having one with the needed capabilities.
http://www.google.com/imgres?imgurl=https://sitevalley.com/blog/wp-content/uploads/2011/06/ram.jpg&imgrefurl=https://sitevalley.com/blog/how-much-ram-do-i-need-on-my-vps/&h=296&w=450&tbnid=-JhdzjPTS23c6M:&zoom=1&docid=wSLVqI6Br3o0cM&ei=M_K-VM2sMsSnyATHqIL4AQ&tbm=isch&ved=0CEAQMygNMA0
The problem with D isn't the language, which is excellent. Unfortunately, superior languages loose out to inferior ones all the time. (Yes, I'm aware that superior and inferior are subjective terms.)
Language quality is nice, but there are several factors that are more important when it comes to market success. These factors include: third party tools (compilers, debuggers, IDEs, profilers, etc.), third party libraries (both quantity and quality are important here), momentum (C++ and Java are pretty well entrenched, and it will take a lot more than being a better language to significantly displace them), and finally there is the coolness factor. Coolness relies on many things, but the one that I think is most important is having a charismatic creator or evangelist.
Now D is making significant improvements in each of these areas, so I expect it to continue to grow in market share. In particular, LLVM support and having Andrei Alexandrescu as an evangelist are pretty huge. It still has a ways to go before it can catch up to C++, however.
I'm an undergrad Computer Science student, and last year I used D for my Compiler Design course in which I wrote just over 18000 lines of D code (including tests and documentation). My experience with the D programming language has meant that I'll probably never use it again for any serious work. The truth is D has some very deep-seated problems within the language, standard libraries, and even the community, which (IMHO) will prevent it from seeing widespread use before a version 3 sees the light of day. To elaborate a tad:
1. Walter and Andrei refuse to make any breaking changes, despite major players in the D ecosystem begging them too.
The language and libraries are riddled with inconsistencies, 'gotcha's', and general ugliness that require breaking changes to fix, and proposals or pull-requests relating to such things are almost categorically rejected on the basis of "lol breaking change". In one case, a well-known community contributor wrote an entire breaking patch to remove virtual dispatch by default (for performance reasons), posted it, got approval from the community, and finally got approval from Walter who merged it (despite it being a breaking change), only to have it all reversed the next day when Andrei found out about it because he "would never have agreed to it". Several medium to large companies that have actually adopted D have literally begged Walter and Andrei to break code and fix the language issues now before it's too late, to no avail. Some examples of such language issues include:
- A horrible mix of keywords and annotation syntax for function/method attributes ('const', 'pure', and 'nothrow' are all keywords, but '@property', and '@nogc' are annotations)
- Huge portions of the standard library are missing attributes like 'pure' and 'nothrow', which directly impacts user code that attempts to include them
- Simply too many attributes, with no attribute inference (template functions/methods infer attributes, but these cannot be virtual and so cannot be overridden in sub-classes)
- Many others - see this example: https://github.com/Hackerpilot/Idiotmatic-D/blob/master/idiotmatic.d
Some of these may seem nitpicky, but they give the language the overall feel of one that is incomplete, hacky, and inappropriate for industry use.
2. Can you turn the garbage collector off? Sure! But don't try and use the standard library if you do!
Most of the standard library is written assuming the garbage collector will clean up after it. Turning it off and using the library therefor means memory leaks ahoy, and leaving it on makes real-time solutions difficult due to the 'stop-the-world' nature of D's GC. There is an effort underway to remove this dependence on the GC, and a short term solution was implemented with the @nogc attribute. That is, yet another attribute, and yet another breaking change that will be rejected when the proposal pops up in a few years to remove the then unused attribute.
3. The documentation poor.
In many cases, the documentation is either out of date, or extremely lacking. At last check, there were still pages referencing deprecated features, or features that have yet to be properly implemented. In the cases that the documentation is correct, it usually lacks basic things such as usage examples and proper explanations of function overloads (and their parameters). To top it all off, the actual presentation of the documentation is incredibly poor when compared with something like Scaladoc.
4. Instead of fixing things, the developers keep tacking on new features, and patches don't get reviewed.
Walter and Andrei are focused on new features, and seem to leave much of the bug-fixing to the community. That's great, until the community proposes a breaking change and instantly gets shot down. On top of that, there are god-knows how many patches and pull-requests that have been awaiting review for *years* without having even been looked at. Such things result in low contributor moral, and have resulted in several community mem
YOU want to read THIS
Well, not really. It's a bit of a rant. You'd make a more convincing argument with better, calmer style.
I haven't heard of D (I'm not a programmer), but it would be great if the trademark/symbol was little blue flowers, for the love of PKD.
Si hoc legere scis nimium eruditionis habes.
From the same article: "On the downside, I searched for D programming jobs and found just a couple". I like D but you can't get work doing it.
As long as it's a garbage collected language it goes in the heap with Java, C# and the rest of the garbage collected languages. If you want to compete with C and C++, you need real memory management.
Talk about underrated! Without TECO there would be no Emacs, and without Emacs, lisp wouldn't even be on that list.
I had thought to add my opinion to this discussion, as I have some 12+ years now. But no, it took half an hour and >30 attempts to post just this: fuck Beta.
D may be "nicer" in some niche-aspects, but they destroy all that by dropping the preprocessor. Yes, I know that the snobists don't like it and think it's "outdated". Yet the preprocessor offers something that no other language feature offers: Because the preprocessor "creates" the C-code, you can do *everything* with it.
For example:
#ifdef UNTESTED_FEATURE
#include "crazy_new_untested_code.c"
#endif
You know what?
If you unset UNTESTED_FEATURE, the program will still compile and work just fine, no matter what crazy things the new guy who was hired to program "crazy_new_untested_code.c" does. He still can check in his work, testers can try it out by setting UNTESTED_FEATURE, etc.
This is the reason why we keep using C after all these years. It's the only (major?) language with preprocessor.
No one else seemed to mention D's Walter Bright is the *same* Walter Bright who wrote EMPIRE, a game Microprose rejected, and them... ahem... payed tribute to as CIVILIZATION. You can get EMPIRE - various versions - free at Bright's web site: http://www.classicempire.com/
it is definitely better than c++ for my use cases, but it needs a Boost port. However as with C/Freebasic/C++ it should offer a better type system I cannot understand why void print(MyObject obj){ writeln(obj.myStringRepresntation); } does not make the compiler complaint that MyObjeect should be marked as const in the signature Of course type inference should have a way to see that writeln is const (the define it) Even if writeln is unsafe, the user could put an annotation on the signature @trust void writeln(const T){ //asm code
}
and one could infer that print should mark MyObject as const. D is a good language, but it needs more love.
If I want to be unproductive I would use C++. The community is souring. I think it is normal though. It's time has come and is gone..
Maybe there's a future with D but I have no reason to try it...
not enough sources -> put a questionmark after the headline.
D is binary compatible with C and it is possible to use C/C++ code and D code in the same application without marshaling. You should be able to have modules written in C/C++ and modules written in D in the same application.
If you are really interested take a look at this application https://github.com/TurkeyMan/fuji
You're off topic & obviously the downmodder of apk's post since you post ac now.
YOU want to read THIS http://developers.slashdot.org...
* It's ALL undeniable concrete & verfiable fact...
APK
P.S.=> I used Delphi to create this latest program of mine (as I do for any freeware/shareware I've created since 1997):
APK Hosts File Engine 9.0++ SR-1 32/64-Bit:
http://start64.com/index.php?o...
It gives you more speed, security, reliability, & even anonymity (to a lesser extent on the latter) than *ANY* single solution out there, bar-none, for less resources consumed using something you already have natively vs. "bolting on more" to do the same (heck, less usually, by far): Details of what it does for you are in the link above...
Enjoy: It's 100% free, & & the BEST in the security antimalware & antispyware business currently http://www.av-test.org/en/news... per that VERY recent test's results also host & RECOMMEND my program for hosts -> http://hosts-file.net/?s=Downl... ... apk
YOU want to read THIS
I can only say again that I don't have much use for posts that read like rants or as advertisements for "APK Hosts File Engine", in which I am both disinterested and uninterested.
Exceptions considered harmful. I mean after all they are PC branches without being able to see where execution will end up
D [] is a lot closer to "C++11 with simpler syntax" than Go.
Another plus point for Go
Link used wasn't apk's program. It's about Delphi (learn to read) http://developers.slashdot.org... His post you replied to only pointed out a program later that he created using Delphi.
"...you had to CALL or PERFORM different code in another statement, returning the answer in a variable."
uh you just described a function, genius.