
The Next Big Programming Language You’ve Never Heard Of - rohunati
http://www.wired.com/2014/07/d-programming-language/?mbid=social_fb
======
tdees40
D? It's been around for a fairly long time, and it doesn't really have much
momentum. I'm not sure why it's "the next big programming language".

~~~
srean
Right! momentum is the most technically relevant quality of merit. Lets have a
wholesome and fulfilling discussion of that aspect in particular. If that
fails, lets discuss semicolons, and braces and make this HN story very
meaningful and informative. After all that is the kind of discussion I come
here for. If an article is crappy lets make the discussion around it crappier
still. Shudder at the thought that a discussion could be stimulating even if
based on an article less than stellar. Low and middle brow, here we come.

Ha! you are fun, searching through my comment history and downvoting old
comments still downvotable. Whatever floats your boat.

~~~
tdees40
I'll bite: a relevant technical question would be: is D really that much
better than C++11 that you should abandon C++ (with all of the consequences
that would have on tooling/libraries/etc.)?

I think D made more sense pre-C++11.

~~~
CountHackulus
Having used both, I'd say yes. C++11 does some wonderful things, many many
improvements that were a long time coming, but D put those improvements into
the core language and their standard library. This makes D much more readable
and hackable than C++11. Not to mention the metaprogramming support is
significantly easier to use (though not more powerful, as they're both
technically turing complete).

~~~
WalterBright
D's metaprogramming is significantly more powerful. For example, string
literals can be template arguments and can be manipulated at compile time and
turned back into D code.

------
rossjudson
The phrase "C++ is an extremely fast language -- meaning software built with
it runs at high speed" needs to be changed to "It's possible to build high
speed software with C++".

I take any performance claims made by a particular language with a pretty big
grain of salt (particularly those made vs Java/JVM) unless they're accompanied
by some reasonably sophisticated benchmarks and source that actually show a
performance difference -- not just one that low-level language enthusiasts
presume exists.

~~~
YZF
Here's one: [https://days2011.scala-
lang.org/sites/days2011/files/ws3-1-H...](https://days2011.scala-
lang.org/sites/days2011/files/ws3-1-Hundt.pdf)

And yes, languages are not slow or fast. The JVM could be as fast or even
faster than native (AOT) because JIT can in theory optimize better than AOT.
There are fixes planned for performance issues. Things have improved since the
benchmark. It's only one particular benchmark. One specific implementation of
VM/compilers/etc. Let me show you some badly written code in language X that
runs slower than language Y on machine Z.

In my opinion JIT is always going to be slower than native (AOT). Maybe the
gap will close but fundamentally you can do anything a JIT does AOT at zero
run-time cost but not the other way around. That's not a language thing, C++
targetted at a JIT environment (and I think you can target .NET for example)
will also run slower and languages that are JITted today could possibly be
AOT.

The other thing is that if a specific language doesn't allow fine control over
memory layouts and data types at the native level and/or if there are inherent
costs in the language's design (e.g. duck typing) that is also something that
will ultimately prevent it from running as fast as languages that do. That's
because you can always build higher abstractions from primitive ones but you
can rarely build a primitive one from a higher one. Very smart compilers may
be able to identify a "primitive use case" and optimize for that but in
general that's a much harder problem.

~~~
brimstedt
Is there any language/environment that tries to combine the two? I.e JIT for a
few iterations and then "settling" on the best optimization and caching it?

~~~
twic
I think you might be talking about tiered compilation, in which case, yes:

[http://www.azulsystems.com/blog/cliff/2010-07-16-tiered-
comp...](http://www.azulsystems.com/blog/cliff/2010-07-16-tiered-compilation)

The Azul JVM has been doing this for some time. The Sun/Oracle/OpenJDK JVM
started doing it in JDK 7. I think IBM's J9 JVM has been doing it for some
time too. I'm sure Microsoft's CLR VM does it, they're a smart bunch.

------
noir_lord
Has anyone at wired these days actually seen a computer?

If they have they should really show it to their journalists.

~~~
drcode
Certainly! Here is video proof:
[https://www.youtube.com/watch?v=-2ZkJd4u0Us&feature=kp](https://www.youtube.com/watch?v=-2ZkJd4u0Us&feature=kp)

~~~
noir_lord
That is perfect!

------
donpdonp
spoiler: the language is D. [http://dlang.org/](http://dlang.org/)

------
nawitus
I think most programmers I know have heard of D. When I took at look at it
years ago, I concluded that the main problem was that it tried to please
everyone. There's simply 'too many' features without a core theme to drive
programming.

~~~
srean
In a fun and meta sort of way you are saying D has not tried to please you.
There are structural problems with this kind of criticism btw I have upvoted
your comment, I do share the vision of a small elegant language yet
sufficiently powerful language. At the same time I if some parts of D were to
be thrown out I would find a way to complain about it. In fact one of my
gripes is that it does not have compile time sum types and pattern matching,
that and lightweight and efficient fibres (I believe these abstractions still
use OS's threading mechanism underneath, I would be very pleased to be proven
wrong).

The thing is D initially wanted to be C++ done right and then C++ done better.
So with that in mind it has to have a lot of features. I do appreciate a lot
that D feels a lot more homogeneous and designed rather than built up with
unrelenting accretion the like C++. An aspect that I quite like is that if it
is not immediately clear what should be the right way to resolve a design
problem (for example name clash between function overloading and
specialization) the D tendency is to make it into an error till the right
solution/semantics emerges. In C++ sometimes the choice is somewhat arbitrary:
here we have k choices lets pick one and go with it even if it has nothing
obviously convincing going for it.

I would like to draw your eye towards templates and template metaprogramming.
It really feels bolted on C++, and its really tortuous to use. In D however,
although it was added much later it gels very nicely with the rest of the
languages. Template metaprogramming is nothing special in D. Its just a
function like any other except that it and its arguments are evaluated at
compile time. (for D developers reading this, please can we have reference
counting for CTFE).

So yes you are correct, it has a lot of features, given D's design scope that
is hard to avoid, but these features do fit well enough with each other for a
practical language to be used in anger, and fit a lot better than its
immediate rival C++ / Java.

~~~
WalterBright
You're right in that people often comment that D has too many features, and
btw please add X, Y and Z features!

------
jbrooksuk
Is this because Facebook uses it? D has been round for longer than they seem
to be making out.

------
addflip
Whenever I see the story is from Wired I always check the comments to see if
it's worth my time more often than not it isn't.

------
x43b
Previous discussion with 14 comments from 6 hours ago
[https://news.ycombinator.com/item?id=7998144](https://news.ycombinator.com/item?id=7998144)

------
signa11
not sure if D is a stranger in these parts.

------
dkarapetyan
Andrei is looking pretty fit these days. Being a research scientist at
Facebook is good for your health it looks like.

------
Artemis2
Sorry Wired, but you don't build up hype for a language like that.

------
acomjean
The problem with low level languages is they don't live in isolation.

As someone who worked on a large project in Ada, you'll need to at some point
use the OS and its libraries which for Unix is in C. Want to network or get a
OS semaphore? C. Many languages support this call to the C library
functionality, but it always seems to force a lot of things back into the C
way of doing things.

Maybe with a runtime (Java!, or ada tasks) this is abstracted away, but its
still there..

~~~
jobu
Alexandrescu talked about D at Boostcon a few years back, and as I recall he
was planning to make it compatible with C system libraries.

~~~
WalterBright
D has been compatible with C libraries since the beginning.

------
exacube
Man, Facebook has a lot of hookups with Wired. You always see articles on
Wired about Facebook projects and tech.

relevant: Co-creator of D works at Facebook.

------
bithush
They got it wrong, the next big language is obviously Limbo![0]

[0]
[https://en.wikipedia.org/wiki/Limbo_programming_language](https://en.wikipedia.org/wiki/Limbo_programming_language)

------
kilon
Programming languages are so previous century. The future is environments that
move away from the machine and deep inside the user's mind. Automation taken
into extremes.

------
pnathan
Last time I looked at D (maybe 6-8 years ago), I saw a C++ reskinned, and two
standard libraries, incompatible.

Looking at it today, it looks much more modern, but I'm simply not interested.
I've drunk the Rust koolaid. :-)

(But it would be interesting to do a compare and contrast with a decently
sized project for both D and Rust).

------
russelluresti
I read the title of this article and thought "HN is now a parody of HN."

------
gerbal
But can it compile to Javascript?

~~~
astrodust
What can't?

~~~
jarrett
True--in principle any language can be executed in the JS runtime. A lot of
them can even be executed reasonably quickly. Though I suppose the parent
comment was asking whether a mature compiler from D to JS _currently_ exists.

------
drudru11
cade metz alert

------
wkdown
Let me put on my tinfoil hat for a second.

Two companies that love user data are making "languages" for us to write our
applications with (Facebook with Hack and React, Google with Dart and Go)

The NSA worked backdoors into RSA encryption. Could the Facebook/Google
compilers provide a similar backdoor for them to syphon data?

/tinfoilhat

~~~
WalterBright
D is all up on [https://github.com/D-Programming-
Language](https://github.com/D-Programming-Language) so I think it'd be kind
of hard to sneak things into it.

~~~
wkdown
I was speaking of the four I mentioned, not D

