18 ms·
My Vision of D’s Future
- arunc 7y agoIt would also be good to know a high level timeline of all these visions. Otherwise these visions will just be visions forever. For instance, https://wiki.dlang.org/Vision/2018H1 https://wiki.dlang.org/Vision/2018H1 directs to https://github.com/dlang/projects/milestones https://github.com/dlang/projects/milestones but both there seems no updates since April/May 2019. Edit: added previous "vision" links
- jacobush 7y agoAs long as we search for stuff on the internet with text terms (i.e. Google) you've got to enhance the name of the language. If only something boring as DLang, please please do this. I feel bouts of sympathy every time I think of D, and I'm not even a hard core fan or anything. No need to change the logo or anything. Just sneak in something actually searchable (dlang, or whatever) in footers and headers of documentation etc. Then just stick to it and Google will do the rest for you.
- einr 7y agoThe domain is dlang.org, the github repository is called dlang, the titles of their pages are things like "Dlang tour" and "Dlang forums". It's already searchable as dlang with no issues.
- arunc 7y agoThe sad part is, every time I type dlang in google for something, it tries to correct it to golang and that's terrible. duckduckgo doesn't do that.
- fao_ 7y agoI mean, Go is funded by google. So, that's kind of what you get when you use a search engine that is run by a major advertising corporation, I think. I hold a rather controversial (at least for HN, apparently) opinion that, I don't think we can expect a corporation to be impartial if there's no legal impetus on it and there's no monetary reason for them to act impartially. Google is a business, that makes money from selling your searches and displaying advertising. So, it's going to do exactly that.
- NikolaeVarius 7y agoI just tried and there is literally no mention of golang in any of the search results
- coldtea 7y ago>every time I type dlang in google for something, it tries to correct it to golang and that's terrible Doesn't do it at all to me...
- deleted 7y ago[deleted]
- arunc 7y ago1. https://i.imgur.com/CzGesdb.png https://i.imgur.com/CzGesdb.png 2. https://i.imgur.com/hlGGwWO.png https://i.imgur.com/hlGGwWO.png 3. ...
- coldtea 7y agoI see. I can get some of those too. Thought you meant the "Showing results for xxx / Search instead for yyy" correction, which switches your (unpopular) yyy query under you. The suggestions are annoying, but can easily ignore and insist on my search term.
- jacobush 7y agoI guess I also mean actually referring to it more as DLang (or something) so people start calling it that. "D" is so hopeless to even use in conversation. Even "Rust" is miles better, and that's not exactly a brilliant name either.
- coldtea 7y ago>"D" is so hopeless to even use in conversation. Not any more hopeless than one of the top-10 most popular languages, C. Except if you mean the juvenile joke it alludes to, in which case, nobody really cares between adults. No company is not gonna be use D because in some memes it means dick. Libraries, tooling, maturity, devs, speed, are the real concerns...
- ben509 7y agoThere's nothing wrong with juvenile jokes; we can be adults without being prudes. The only issue with D is the well runs dry pretty quick.
- destructionator 7y agoYeah, you don't want to know how many times I have said "I work with the D Programming Language" and people are like "are you a psychologist like deprogramming brainwashed people?" Though I usually just shoot back "no computers. code people just suck at names"
- beat 7y agoYes, this is why the Go language was a complete failure too. And C before that.
- cxr 7y agoThis reads as if you're willfully misunderstanding the other person's point just so you have an excuse to leave a snarky comment. There are lots of other forums for that.
- littlestymaar 7y agoTbf, C was big way before Google even existed (and nobody expects "Clang" to mean C, unlike D or Go). And even if it obviously didn't cause Go to fail, it's still something annoying when googling up about Go, because "Golang" doesn't always work.
- webgoat 7y agoYou speak as if you've never coded in Go before. If you've ever tried looking up information related to Go online, most of the time you'll find that results come up unrelated due to the short moniker. I've made a practice for myself to always search up "go" first and then "golang" because of how varying the search results tend to be, which leads me to also believe that much of the online knowledge related to Go tends to fall through the cracks due to bad SEO.
- rickette 7y agoIt's beyond me why most languages fall into this trap: C, C++, C#, D, Go, etc. All hard to search for. Granted some of these predate the internet, but most do not. Almost looks like some kind of secret agreement between language designers.
- furyofantares 7y agoI’ve used all of those languages and never had a problem searching for things for any of them, with the exception of C# very briefly at the time it was released. Whenever this complaint is lodged I feel like it’s just an easy thing to complain about that isn’t an actual problem at all. Am I wrong?
- yiyus 7y agoWhat you call trap I call tradition. There is a limited number of one letter names, getting your language to be identified with one is a big achievement. For D in particular, there has been a long competition to become "the next C" and the name has helped D to always be considered a contender. And it does not poses such a problem for searching engines in practice. At the end of the day, you never search for "C", you search for something like "pointer to function in C" and probably much more specific, so any search engine will give you right results.
- tsegratis 7y agoI'm going to name my language after ' ', ascii 32
- quickthrower2 7y agoWhat about lower case c
- ttkciar 7y agoGoogle for "dlang" (including the quotes) and you'll get all the D hits you want.
- he_the_great 7y agoNot only has that been happening for years, Google will match D when you search for dlang, wouldn't be surprised if the reverse is true. Google has figured this out for you.
- kitd 7y agoD needs to up its game with the Techempower benchmarks IMHO. Vibe.d has been completely left behind by the usual Rust/Go/Java suspects. I'm very confident that it is capable, but that isn't particularly obvious atm.
- dsissitka 7y agoI was curious. The best entries for D on physical hardware: JSON serialization: 144 of 366 Single query: 152 of 404 Multiple queries: 195 of 394 Fortunes: 154 of 371 Data updates: 99 of 365 Plaintext: 81 of 352
- coldtea 7y agoI don't think anybody really cares about the Techempower benchmarks. Else we'd all be using Vert.x or so. The most popular frameworks having the 90% of deployments, are at the middle to bottom of the Techempower benchmarks.
- bsaul 7y agoI think people thinking about using D care a lot about benchmarks. The reason "most popular frameworks" are in the middle to bottom of the list is becaue they are made with dynamic languages which are/were very popular for ease and speed of development, with a huge number of web-programming functions baked in. On the other hand, you will note that go / rust and C frameworks (which are playing in the same field as D) are on the top of that list.
- StreamBright 7y agoWe actually do care about those benchmarks. At a certain scale it matters how many servers you need to run a website with millions of visitors. 90% of deployments do not have this problem, yet saying nobody cares is a bit silly.
- mhh__ 7y agoAt that scale do you use a stock framework though? An advantage of D in that situation is how easy it is to change the internals of an API without those changes propagating to the surface, both by design (e.g. UFCS, no brackets) and how that design is used (e.g. Templates)
- pornel 7y agoC++ interop sounds like a great unique selling point. Rust/Go/Swift can't match it.
- k__ 7y agoWhy can't Rust match that?
- efficax 7y agoRust doesn't have classes, for one?
- pornel 7y agoMore specifically, Rust doesn't have inheritance of data. It uses composition and can simulate inheritance of interfaces. That suffices for Rust programs, but gets awkward quickly with some classic OOP-heavy design patterns. Despite superficially similar angle bracket syntax, C++ templates and Rust generics are very different and incompatible in all but most trivial cases. D templates can get closer. Rust also lacks many C++-isms: there are no copy/move constructors, no custom code can run on assignment, operator overloading is more conservative, there's no life before main(). Error handling, iterators, and strings are done differently. Even if C++ could magically work in Rust, it'd be weird. OTOH D feels much like a rewrite of C++.
- k__ 7y agoSeems like Mozilla uses Rust with C++ in Firefox on a daily basis: https://news.ycombinator.com/item?id=21262860 https://news.ycombinator.com/item?id=21262860
- marcosdumay 7y agoMost languages settle down with C interop and don't bother with the added complexity from C++. Rust is one of those, some of the concepts aren't even on the language right now, what would lead to very non-idiomatic imports.
- thiago_fm 7y agoCan somebody enlighten me, why use D when there is Rust/Go? I think on almost all cases, and also having a bigger community, it is a win for Rust/Go.
- jordigh 7y agoI find D easier to use than Rust or Go because of familiarity. It is very obviously C and C++ inspired but without all the sharp edges. I also love D's metaprogramming. It feels almost like lisp. Go's lack of generics doesn't allow this and Rust's macros don't feel as comfortable for me. Yes, D is smaller but it's also big enough for me. I don't feel like I'm missing out on much when I'm using D. If I need a library to do something that isn't already in the fairly generous stdlib, I can find it on DUB. http://code.dlang.org/ http://code.dlang.org/
- snagglegaggle 7y agoGood post. I haven't used D much, but the only way I really see it as "deficient" is its inability to easily create static binaries, like Go. But in a lot of ways that is never a hard requirement (it is nice, though).
- BubRoss 7y agoWhy can't D create static binaries? I've never heard that before.
- arunc 7y agoI have never heard of that before. I create and link static libraries all the time. My exes are usually a drop in without any dependencies whatsoever.
- snagglegaggle 7y agoSorry -- it can, but in much the same way GCC does. You need to manage all your deps. With go it just happens, a huge time saver.
- jeffrallen 7y agoThis is excellent news for D, Atila is a great choice for this role.
- gravypod 7y ago> Traditionally this is done by specifying data structures and RPC calls in an Interface Definition Language (IDL) then translating that to the supported languages, with a wire protocol to go along with it. > With D, none of that is necessary. One can write the production code in D and have libraries automagically make that code callable from other languages. If you're using an RPC IDL you explicitly do not want to share that code, you want to share that API.
- atilaneves 7y agoYou could share D .di files, which are akin to C/C++ headers, but automatically generated by the compiler.
- anderspitman 7y agoDoes this work over arbitrary concurrency barriers (ie a network), or is it for libraries only?
- gravypod 7y agoThis. You definitely aren't attempting to build a service in one heap/address space if you're using an RPC IDL.
- atilaneves 7y agoYou'd be surprised...
- gmueckl 7y agoIn principle, the compile time code generation involved can generate arbitrary wrappers including networked RPC. It wouldn't be terribly hard. It just hasn't been done yet as far as I know.
- grawprog 7y agoI have to say, I like what I read there. I'm glad they're working more on c++ interoperability. I've ported some c++ code to D before, it wasn't not too bad, it wasn't a lot of code, but it would be great to be able to work directly with c++ libraries in D similarly to C libraries. It always makes me sad D hasn't picked up more. Usually comments I see about D seem pretty ambivalent to dismissive. It's a great language and to me has always felt like the way C++ should have been. It does seem to be growing in popularity. Even in the years I've been using it, the number of libraries and community resources has expanded exponentially and every day new code is being added to https://code.dlang.org/ https://code.dlang.org/ Not to mention dub is probably the most simple straightforward build system I've worked with.
- tempsolution 7y agoThe main reason that D hasn't been picked up by anyone is mostly because it is an evolution of C++, not a revolution. Discarding an entire ecosystem for an evolution is not going to happen. Rust took a very different approach and just threw everything away. D looks and feels too much like C++, I would rather have hoped that effort would have been spent on making C++ better.
- einpoklum 7y ago... and over the past decade-and-a-bit, C++ has been evolving itself quite nicely (IMHO), so the motivation for moving away from it has decreased. Also, now D probably has to "chase" some C++ developments.
- pjmlp 7y agoThe problem is that while modern C++17/20 are quite productive, we cannot get rid of C copy-paste compatibility and the errors of the past (see Python 3). So either you work alone, in a small team that appreciates modern safe C++ (including Core guidelines), and enjoy C++, or you are faced to deal with all idiocrasies and unsafety issues from the past.
- 7y ago
- dmix 7y ago> We’re mostly there—using the actor model eliminates a lot of problems that would otherwise naturally occur. So D comes with an actor system baked in at the language level? I like that sort of thing after using Erlang and using some half baked libraries in other languages. I’m curious how good it is...
- mochomocha 7y agoYes! I've only used it minimally in a non high load scenario, but it's been a pretty smooth experience.
- ttkciar 7y agoD comes with a lot of "casual parallelism" baked in at the language level, and in its standard libraries. Actors are just one feature among many. You -can- explicitly manage threads and processes like in other languages, but much of the time there is a more lightweight, expressive construct available. For instance, you can turn this loop: foreach(ref i; arr) i = i * i; Into a parallelized loop by simply: foreach(ref i; parallel(arr)) i = i * i; Example was shamelessly lifted from: https://tour.dlang.org/tour/en/multithreading/std-parallelism https://tour.dlang.org/tour/en/multithreading/std-parallelis...
- macintux 7y agoMuch like immutability, I don’t generally find it compelling when a language offers such a critical feature as just one among many. I prefer my languages to be opinionated. I’m curious how the actor model works on a large system with lots of 3rd party libraries (or even different development teams) when you can’t guarantee that everyone is using it.
- kernyan 7y ago>I think we need a ridiculously fast interpreter so that we can skip machine code generation and linking. To me, this should be the default way of running unittest blocks for faster feedback, with programmers only compiling their code for runtime performance and/or to ship binaries to final users. This would also enable a REPL. I am most excited about this, where a language supports two modes 1) interpreter for development, and 2) compilation for performance. Never thought about this, but reading this, it makes perfect sense on large projects
- karussell 7y agoJava can do this via AOT or partially also JIT compilation. For AOT there is this JEP: https://openjdk.java.net/jeps/295 https://openjdk.java.net/jeps/295 and a different project: the GraalVM
- pjmlp 7y agoAs addendum, Java has had support for AOT since around 2000, the only caveat is that it has been a feature only available on third party commercial JDKs. GCJ improved very slowly and around 2009 lost most of its developers with the release of OpenJDK.
- mhd 7y agoJava could do this always, as it's a compiled language (the important thing here is interactivity vs. compilation, not JVM vs. native). So I'd say that Java can do "this" since recently (JDK 9 in 2017) via JShell (I wouldn't count BeanShell or Groovy), i.e. it always had the compiler part but added the interpreter. Although its usage is still quite rare, whereas the blog post would suggest a different pattern.
- scns 7y agoOCaml works like that
- buckminster 7y agoHaskell too.
- Profan 7y agoI wish standardizing documentation tooling (everyone uses a different tool today and ddoc by default has _no_ styling, no navigation, no nothing, so usually nobody writes docs for their code unless it's a big project like vibe.d) and IDE support was on this list (vscode centric tools exist and mostly work, but it's still fairly hit and miss) .. D's tooling has languished for a long time even if it is a great language otherwise.
- EvenThisAcronym 7y agoVisual D with Visual Studio is the gold standard, with full debugging, autocomplete, and static analysis support. Code-D with VS Code is also great, and it has fairly recently gotten funding from the D Language Foundation for further development. There's also DCD, D-Scanner and dfmt which can be used with a lot of different editors.
- 1980phipsi 7y agoDo either Visual D or Code-D work with Linux or WSL? It would be really nice to have the GUI for debugging linux code. Some libraries are just much easier to get set up in linux.
- aldacron 7y agoVisual D is a plugin for Visual Studio, so no. Code-D is a plugin for VS Code, so it works anywhere VS Code does.
- 1980phipsi 7y agoAlso, what's the difference between code-d [1] and dlang-vscode [2] [1] https://marketplace.visualstudio.com/items?itemName=webfreak.code-d&ssr=false https://marketplace.visualstudio.com/items?itemName=webfreak... [2] https://marketplace.visualstudio.com/items?itemName=dlang-vscode.dlang https://marketplace.visualstudio.com/items?itemName=dlang-vs... Edit: It seems that dlang-vscode recommends to instead use vscode-dls [3] or code-dlang. [3] https://marketplace.visualstudio.com/items?itemName=LaurentTreguier.vscode-dls https://marketplace.visualstudio.com/items?itemName=LaurentT...
- rcpt 7y agoI can never believe how fast their forums load
- ktm5j 7y agoAs someone who has only somewhat recently started using D, I would love to see this language succeed. It's been such a pleasure to use.. scope guards, string mixin, inline json & std.json. It's been so useful for the code I write at work. Much love for D The one thing I would add to this list is documentation! There is a lot of good documentation available, but not for everything you would expect. For example, I had a hard time figuring out the behavior of sub-packages within a dub package. Some more explicit documentation on this subject would have been appreciated.
- jordigh 7y agoI find that D is about as easy as Python to get into. Being able to use rdmd as a shebang makes D almost feel like as scripting language. A lot of Python was also pretty easy for me to directly translate into D. Here is an example: http://inversethought.com/hg/medcouple/file/tip/medcouple.py#l94 http://inversethought.com/hg/medcouple/file/tip/medcouple.py... http://inversethought.com/hg/medcouple/file/tip/medcouple.d#l79 http://inversethought.com/hg/medcouple/file/tip/medcouple.d#...
- skocznymroczny 7y agoWhile I enjoy using D, I find it hard to use at times. Especially if someone isn't a C++ veteran, as soon as heavy template usage comes into play I get confused, and error messages are useless because it's several screens of errors with multiple isX() && !isY() && isZ() conditions for types. Most of the standard library function calls return some opaque Result type which isn't obvious how to progress from. Only after some googling you'll learn that if you import std.array you can use .array() on the Result and get something usable. Oh, and I don't even know if it's possible to pass such Result to a function because you have to use auto to declare it.
- jordigh 7y agoYes, there's an extra barrier with D because of type checking, but in exchange, you get compile-time checks. I actually kind of like those template errors because they tell you what kind of Python-like compile-time duck-typing D is trying to use! Oh, and you can also use type deductions for function declarations! Just make it a template and let D figure out for you what type you want, or use typeof to record the type you want and use that typename in your function declaration.
- mhd 7y agoWhat about -betterC? I always thought this was a nice "pivot" for D. It would be great to have more support for this direction. You can't avoid malloc there, but maybe some instrumenting for leak detection or some libc replacements that exploit or are exploited by the language. Other than that, I'm okay with anything that was already in Eiffel or Modula-3…
- skocznymroczny 7y agoBetterC was created at first to make it easier to port D compiler from C to D. Then people realized that it might be interesting to have D without GC and without runtime, because it makes it trivial to port to other platforms such as embedded, mobile or WASM. The problem is, betterC is kind of in that awkward spot. It's not comparable to the "real" D, and if you can live with betterC, you might as well just use C and enjoy the wide C ecosystem.
- grok2 7y agoBut as a language doesn't betterC provides lots more useful features than C (the module system, meta-programming (imagine C with generics), scope() and many other useful things) that make it really a better language than C while still keeping C interop. I agree that it is in an awkward spot though -- and would have benefited from being it's own separate programming language. It would have been a killer feature if it could also compile standard C at the same time!
- grok2 7y agoIt would have been a killer feature if in betterC mode it could compile standard C programs and be a drop-in replacement for GCC/Clang :-).
- renox 7y agoZig is doing this, an interesting feature.
- 1980phipsi 7y ago
- atilaneves 7y agoI didn't submit the link but I did write the blog post. AMA!
- mochomocha 7y agoThanks Atila! I'm curious about your work around reflection, care to give more details? This is one of the great strength of D, and having some API consolidation sounds awesome. Also: any opinion about runtime reflection capabilities? I love compile-time reflection as much as any other D user, but sometimes runtime reflection can do wonders if used parsimoniously.
- atilaneves 7y agoI'm working on a library right now that, I hope, will have an easy to use API. It'll also have a "mixin/ctfe version", whereby all reflected characteristics are returned as strings that can be mixed in. This opens the door for runtime reflection as well. It's in the works.
- qznc 7y agoWhat happened to Andrei?
- pjmlp 7y agoHe is still around, but private life has gained more priority and he decided to refocus. There was a post about it on the forums.
- qznc 7y ago> Thanks, Mike. And thanks to all for the concern - I also got a few private emails asking me for the juicy details. Of which there are none - my family needs me and some volunteering activities had to give way. > As Jonathan mentioned I'm still working with my students and working on the Foundation administration, legal, taxes, and finances. > I've been involved with D since 2005. That's an eternity in this business. I think bringing Atila to the fore is a great positive because it brings a fresh perspective and approach. from https://forum.dlang.org/post/qj18h2$8o1$1@digitalmars.com https://forum.dlang.org/post/qj18h2$8o1$1@digitalmars.com
- giancarlostoro 7y agoI love D and one space I want to see more of is DMD on SBC's and moreso than that D running on WebAssembly, Go and Rust do it. I consider Rust and Go the main competitors to D, not sure if others would agree, but that's just my view. Other than that it's a great language.
- The_rationalist 7y agoLet's be real, in the real world D, go or rust are not competitors to anything. Just take a look at http://www.modulecounts.com http://www.modulecounts.com to see the gap between language ecosystems.
- giancarlostoro 7y agoI'm not sure I agree with "real world" being the number of publicly available packages. Better metric is companies using those languages: https://dlang.org/orgs-using-d.html https://dlang.org/orgs-using-d.html https://www.rust-lang.org/production/users https://www.rust-lang.org/production/users and we know plenty are using Go in prod, including Slack, Google (heavily for YouTube's database layer), and many others.
- Ygg2 7y agoWhy did you link to start of production page? https://www.rust-lang.org/production/users https://www.rust-lang.org/production/users has all production users (it admittedly has a lot of Bitcoin Startups). But lacks some important users like Microsoft (for ripgrep in Visual Studio Code) and Facebook for its usage of Rust for Mercurial (admittedly this isn't production ready).
- giancarlostoro 7y agoI hadn't been to their users page in a while. I'll update my post.
- eikenberry 7y ago
- dwrodri 7y agoI would love to see D succeed as the king of interop. That would be a great niche to fill.
- alexashka 7y agoThe one comment on the article on the page I think is spot on - I think every programmer language designer underestimates the importance of good IDE support.
- WalterBright 7y ago> I think every programmer language designer underestimates the importance of good IDE support. Oh, we're well aware of it. It's just that the language design part consumes all our time.
- giancarlostoro 7y agoThankfully we've now got LangServer thanks to Microsoft which helps tremendously! It means any IDE / editor can be useful once at least a single LangServer project is made per language. Code once, use anywhere! A good IDE used to be my hangup for D but VS Code has a very solid plugin.
- deleted 7y ago[deleted]
- Sarahz92 7y agoThere is a lot of good documentation available
- flowerlad 7y agoA major missing feature is checked exceptions. See long discussion thread here: https://forum.dlang.org/thread/hxhjcchsulqejwxywfbn@forum.dlang.org https://forum.dlang.org/thread/hxhjcchsulqejwxywfbn@forum.dl...
- Discombulator 7y agoThis is glossing over the fact that checked exceptions are a very controversial feature and that most language designers (is there any language besides Java that supports them?) do not implement them on purpose.
- flowerlad 7y agoWhy is it controversial? The controversy came from C# vs Java and if you have programmed in both you’d know that exceptions are broken in C#. Broken because you have to catch the base Exception class if you want to avoid crashing and that’s disrecommended by all C# linting tools.
- divint 7y agoNim supports them with the raises pragma
- axilmar 7y agoI don't like D mainly because of the whole dichotomy between structs and classes (and also because of many other smaller things). But I don't think D hasn't succeeded in replacing C++ for this reason; the reason D hasn't succeeded yet is because it's relatively unknown in the enterprise developers circle. Most people haven't heard of D.
- fithisux 7y agoI would like to have a java to D, because a lot of scientific libraries are done in Java. If the interop is easy and can automagically create Java compatible libraries from D, it is a big win. Hopefully it is in the roadmap. C++ interop not that much for me.