News for hackers. Stuff that matters.
Re:How I Came to Write D (2014) by curtis on Sunday June 03, 2018 @02:17PM (#17220856)
Back when Andrei Alexandrescu was working at Facebook, I had hoped that Facebook would adopt D as a standard language. That didn't happen, and it seems unlikely that D will get a powerful corporate sponsor. I think that would have greatly helped D not just in terms of resources, but also in terms of popularity.

In an ideal world, good programming languages would win or lose on their own merits, but that doesn't seem to be the case in the world we actually live in.

Re:How I Came to Write D (2014) by baruch on Sunday June 03, 2018 @04:24PM (#17221597)
We are not yet up to Facebook power at weka.io but we fully use D and support some development of it. We have also released recently a library we use internally for user space threads and other support stuff, called mecca.

D is really nice and very effective, even for a soft real-time system like ours. Most of our code didn't do any GC but where we don't care too much we can make our life a little easier.

Re:How I Came to Write D (2014) by bachmeier on Sunday June 03, 2018 @03:10PM (#17221155)
> good programming languages would win or lose on their own merits

Well I suppose that depends on what you mean by "merits". D has struggled with things like IDE support and breaking changes. A lot of that is now cleared up or being worked on as the language has seen increased activity over the last few years. I expect remaining issues to get cleaned up in the near future.

Another thing that kept folks away was the garbage collector. Quite a lot of work is being done to make it possible to use as much of the language as possible without the GC. Nonetheless, for many potential users, fear of the GC was a reason to not use D.

Re:How I Came to Write D (2014) by WalterBright on Sunday June 03, 2018 @04:08PM (#17221497)
You can use DasBetterC now with no GC whatsoever.
Re:How I Came to Write D (2014) by grok2 on Sunday June 03, 2018 @09:37PM (#17223811)
What is DasBetterC?
Re:How I Came to Write D (2014) by NonEUCitizen on Sunday June 03, 2018 @09:53PM (#17223890)
D as a Better C

from Walter's post: https://news.ycombinator.com/item?id=17192702

Re:How I Came to Write D (2014) by grok2 on Sunday June 03, 2018 @10:14PM (#17224008)
So, not the German "Das"...I was aware of -betterC, but was curious about Walter referring to it everywhere of late as DasBetterC.
Re:How I Came to Write D (2014) by WalterBright on Sunday June 03, 2018 @10:15PM (#17224020)
I was in Muenchen when I noticed the "Das", so yes, it works as the German Das.
Re:How I Came to Write D (2014) by girvo on Sunday June 03, 2018 @09:51PM (#17223878)
Subset of the D language that acts as a “better C”. No GC, manual allocation etc. and no runtime I believe.
Re:How I Came to Write D (2014) by nine_k on Sunday June 03, 2018 @03:47PM (#17221368)
Corporate support or not, Rust seems to be a better contender for the crown of the sane successor to C++.

D might have been an important evolutionary step, possibly showing what does not work well for the niche it was trying to fill.

Re:How I Came to Write D (2014) by curtis on Sunday June 03, 2018 @04:09PM (#17221499)
I think Rust is the clear winner for OS-level programming. I'm not at all sure that it's the right solution for application-level programming. I think Go got two things right for the statically compiled application-level space: Fast compile times and garbage collection. Of course I feel like they got everything else wrong [1], but that's what we've got in that space right now. I think that D might be a much better fit for this space, but it doesn't matter because Go has sucked up all the oxygen.

[1] I realize that this is not a universally held opinion, but it certainly seems to be pretty widely held.

Re:How I Came to Write D (2014) by nine_k on Sunday June 03, 2018 @09:28PM (#17223765)
JS, Python and Ruby have zero compile times and GC; at least JS and Python 3 have a reasonable and widely understood approach to concurrency (if not true parallelism).

Kotlin has reasonable compile times, GC of course, and also a reasonable concurrency story.

Go apparently has other special features, like making a single binary, and having very low-delay GC. Also, it's very simple; it's basically a pared-down Modula-2 with the Oberon's methods thrown in. It also got non-fitting magic features added, like returning two values (not a tuple), or built-in generic functions (like `make(chan)`) without generics anywhere else, etc. These do not fit well, which makes many people sad.

Re:How I Came to Write D (2014) by stewbrew on Monday June 04, 2018 @06:44AM (#17226465)
JS, Python, or Ruby have zero ahead of time compile & link time. They need some time to generate byte code, to compile the code "just in time", to load source or byte code from disk etc.
Re:How I Came to Write D (2014) by VHRanger on Sunday June 03, 2018 @06:03PM (#17222537)
Go certainly has a very focused marketing effort.

They even have branding best practices and so on.

Of course, Google, being an advertisement company, has a lot of know how in that area.

Too bad Go is being held back by Rob Pike's ego, in my opinion.

Re:How I Came to Write D (2014) by jstewartmobile on Sunday June 03, 2018 @07:47PM (#17223225)
What's so bad about Rob's ego? If you want a language by people who say yes! to everything, we already have C++ and C#.
Re:How I Came to Write D (2014) by _yawn on Sunday June 03, 2018 @09:02PM (#17223629)
You can have lots of expressivity without having that many features. But go has neither, and things like no operator overloading just plain sucks when dealing with vectors, for example.
Re:How I Came to Write D (2014) by kqr on Sunday June 03, 2018 @04:47PM (#17221849)
How does Rust have a clear hand over Ada?
Re:How I Came to Write D (2014) by jnbiche on Sunday June 03, 2018 @11:11PM (#17224284)
Rust's cutting edge compiler is free, for one thing. I love Ada, but Adacore may well have killed any chance it had of being a commercially viable language (its use declines precipitously each year, even in the defense and avionics industries where it used to be strong).

Plus, Rust has a thriving community whereas thanks to Adacore, Ada has a dying one. Community is critical for programming languages.

But otherwise, Ada is a brilliant and ultra safe language whose safety features go far beyond the memory and type safety that Rust features.

It's a shame.

Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @04:20AM (#17225614)
If anything Adacore has helped Ada a lot.

It is the only Ada compiler available for free, fully updated to Ada 2012, with all the remaining ones are still on their 90's style prices.

https://www.ptc.com/en/products/developer-tools/objectada

https://www.ghs.com/products/ada_optimizing_compilers.html

https://www.ddci.com/products_score/ (frozen in Ada 95)

Thanks to them Ada has become a regular presence at FOSDEM and is being teached at quite a few European university.

Re:How I Came to Write D (2014) by abiox on Monday June 04, 2018 @12:36PM (#17229577)
according to wikipedia, their 'free' compiler is GPL without a linking exception. the comparison chart on their page also says it is 'for open source GPL software'.
Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @02:04PM (#17230379)
Apparently people keep forgetting without GPL, Linux would never happened.
Re:How I Came to Write D (2014) by jnbiche on Monday June 04, 2018 @10:17PM (#17234456)
GPL for an OS is I've thing. GPL for a compiler and runtime is entirely another, since only the latter forces any project you create with it too carry the GPL license.
Re:How I Came to Write D (2014) by pjmlp on Tuesday June 05, 2018 @03:48AM (#17235689)
Ah you mean gcc, the compiler that everyone ignored until Sun started the trend of UNIX vendors to charge for their compilers.
Re:How I Came to Write D (2014) by jnbiche on Tuesday June 05, 2018 @08:47PM (#17243503)
GPL's runtime isn't GPL, it's got the runtime exception:

https://www.gnu.org/licenses/gcc-exception-3.1.en.html

Re:How I Came to Write D (2014) by jnbiche on Wednesday June 06, 2018 @07:04AM (#17246010)
Sorry, I meant GCC's runtime isn't GPL.
Re:How I Came to Write D (2014) by CyberDildonics on Tuesday June 05, 2018 @01:05PM (#17239702)
No one is arguing that there is a place for the GPL.
Re:How I Came to Write D (2014) by rwallace on Monday June 04, 2018 @01:04AM (#17224808)
How did Adacore kill Ada?
Re:How I Came to Write D (2014) by dbaupp on Monday June 04, 2018 @02:29AM (#17225134)
One technical reason is Rust has safe dynamic (de)allocation (and without a GC), whereas I believe Ada misses that large segment of the "market" (it theoretically allows a GC, but IIRC the implementations do not support that meaningfully). I could be wrong, but I don't think there's anything quite to the same degree in Ada but missing from Rust.
Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @04:14AM (#17225581)
Ada has RAII via controlled types and allows for memory pools.

Also Ada allows for compiler assisted runtime allocation. For example, you can declare a datastructure with the size you want, and if it fits the stack it will be allocated, otherwise you get an exception.

Deallocation C style requires the Uncheked_Deallocation package.

Ada 95 removed GC from the standard, as no compiler ever bothered to implement it.

Here is an overview presented at FOSDEM 2016.

https://archive.fosdem.org/2016/schedule/event/ada_memory/

With SPARK and Ada 2012, Ada allows for better security constraints than Rust.

"Real-Time Critical Systems: HRM Prototype & Ada Integration"

https://www.amazon.com/Real-Time-Critical-Systems-Prototype-...

Re:How I Came to Write D (2014) by girvo on Sunday June 03, 2018 @09:52PM (#17223889)
Community. That’s the big answer. Even if Ada is better, Rust has mindshare.
Re:How I Came to Write D (2014) by nine_k on Sunday June 03, 2018 @09:14PM (#17223685)
Mmm.. lifetimes analysis?

I'm no expert in either Ada or Rust, but I _suspect_ that type system is more expressive in Rust, allowing for more precise static constraints.

Ada, of course, has decades of prod experience, though.

Re:How I Came to Write D (2014) by elcritch on Monday June 04, 2018 @04:48AM (#17225771)
Not familiar with the deps of Ada memory management. It has a form of checked RAII, but no idea if it’s done via linear types. However Ada still has a more sophisticated type system for refined typed, aka sub-integer or float types. See [0] for a discussion on Rust issues.

If you combine Ada with Spark you get some (still) amazing compile type proof checking of projects. [1]

Rust _could_ develop to have similar abilities (I hope!). But it’d need more generalized linear types or dependent types. Though one could write macros with stargeted higher level type checking DSL for, say, embedded development targets.

0: https://github.com/rust-lang/rfcs/issues/671 1: https://docs.adacore.com/spark2014-docs/html/ug/en/source/ty...

Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @04:23AM (#17225638)
Rust isn't as expressive as SPARK, which got merged back into Ada 2012.
Re:How I Came to Write D (2014) by _yawn on Sunday June 03, 2018 @08:58PM (#17223605)
Do you mean winner in terms of popularity or in terms of quality? In terms of popularity, it's pretty clear we are in for at least a decade of C++ & Javascript.
Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @09:12AM (#17227372)
Thankfully Java and .NET are finally making AOT also part of the standard toolchain, instead of depending on third parties.

Including compilation to WebAssembly as target.

Re:How I Came to Write D (2014) by CyberDildonics on Tuesday June 05, 2018 @01:07PM (#17239716)
That's been a common thread about java for 20 years
Re:How I Came to Write D (2014) by nepeckman on Monday June 04, 2018 @09:13AM (#17227379)
I'm curious, what are your thoughts on Nim? I've used it a little, and compile has always seemed fast. It has garbage collecting on by default, and other language niceties. I feel like it fairs pretty well as an application language.
Re:How I Came to Write D (2014) by iainmerrick on Sunday June 03, 2018 @03:59PM (#17221439)
Rust has Mozilla.

Support from a big corp is one way to get things like IDE support ironed out, as they can throw extra resources at it.

Re:How I Came to Write D (2014) by fnord123 on Sunday June 03, 2018 @04:17PM (#17221541)
The IDE support has come from various places including Jetbrains.
Re:How I Came to Write D (2014) by leshow on Sunday June 03, 2018 @08:47PM (#17223548)
Lots of people use RLS, and AFAIK that's created by folks working at mozilla, though no doubt now it's mostly a community effort.
Re:How I Came to Write D (2014) by earenndil on Sunday June 03, 2018 @05:11PM (#17222098)
IDE support came from the community as an intellij addon, which jetbrains then officially sponsored. But they didn't decide to throw their own resources at making such a thing from scratch.
Re:How I Came to Write D (2014) by bluejekyll on Sunday June 03, 2018 @09:33PM (#17223788)
Jetbrains has sponsored an alternative to the RLS, Rust Language Server.

The RLS is used in VSCode, I think Atom, I’ve seen a port for Emacs, and I think Sublime.

The community effort is behind the RLS, the Jetbrains plugin for IntelliJ doesn’t use any of the Rust compiler, as far as I’m aware, but it does have a lot of fans, so they’re doing something right.

As a Java fan of IntelliJ, I still prefer the RLS+VSCode, but it’s great seeing all the IDEs being developed for Rust!

Re:How I Came to Write D (2014) by ekr on Sunday June 03, 2018 @04:22PM (#17221582)
At least Facebook is currently heavily investing in Haskell (using it for some core infrastructure, and having hired some core GHC contributors).

MSFT is also contributing to Haskell by supporting Haskell-related research, and employing Simon Peyton Jones.

Jane Street Capital is also heavily investing in OCaml.

While these languages are occupying a different niche than D, they are more arguably innovative/ integrate way more research / plt theory.

Re:How I Came to Write D (2014) by xtreak29 on Sunday June 03, 2018 @10:08PM (#17223974)
Netflix opensourced a neural network library that runs some critical piece of code but they are mostly a polyglot shop.

https://github.com/Netflix/vectorflow