6 ms·
D is a niche language that didn't quite manage becoming mainstream. I came across an excellent article Why your F# evangelism isn't working (https://ericsink.co
by nindalf 3y ago
D is a niche language that didn't quite manage becoming mainstream. I came across an excellent article Why your F# evangelism isn't working (https://ericsink.com/entries/fsharp_chasm.html https://ericsink.com/entries/fsharp_chasm.html) that explains why this didn't happen for F#, but the insights generalise to other languages. Here's my summary:
- Adoption of any technology is by a normal distribution.
- The segments are early adopters, pragmatists, late adopters and laggards.
- If you want a technology to become mainstream, you need to make the pragmatists adopt it.
- This is rational behaviour and there's no use trying to convince the pragmatists otherwise. They will choose "predictably disappointing" over "excellent and unproven" every time.
- Technology is merely a tool to them. They don't care if it's fun or not, as long as it gets the job done.
- Mainstream success is impossible without getting the pragmatists on board. Until then you have a curiosity used only be early adopters.
- How to cross the chasm? He recommends finding a pragmatist in pain and solving their problems. Gradually convert pragmatists one by one.
I don't think D was ever able to articulate to the pragmatists why they should adopt D over C++ or other languages. Fixing a few warts with C++ wasn't enough.
Meanwhile Rust managed to appeal to the pragmatists by saying "we know you use C and C++ because of the performance despite the issues with it. Why don't you try a language with the same performance, which also fixes some of the issues (buffer overflows above all) at compile time".
Rust was far from perfect when it started seeing adoption by pragmatists, and it remains far from perfect today. But perfection isn't the goal, nor is a "fun" language for early adopters. What matters is solving a problem that pragmatists face and then convincing them to give you a shot. In practice this is a bar that is high enough that most languages never cross it.
- ksec 3y ago>Meanwhile Rust managed to appeal to the pragmatists I don't see that at all. I see it appeal to idealist. At the end of the day I think it is more of an economic model rather than that distribution problem. You need a company to be the language power house.
- tastyminerals2 3y agoor you could simply be supported by a billion revenue company that pays your bill if you code "their custom version of C". No need to do social analytics. D could totally be that language but it was never driven by big enough companies and had a specific early years history which obscured it pretty well from pragmatists crowd.
- nindalf 3y ago> never driven by big enough companies Not sure that's true. One of the first adopters of D in production was Facebook, because one of the engineers (Andrei Alexandrescu) worked there and evangelised it heavily internally. Many projects were written in D. But eventually the cost of maintaining support for one more language in production didn't make sense. D didn't solve problems that C++ (another supported language at Facebook) didn't. The D code was rewritten. It's not that Big Tech didn't adopt it. It's that it didn't show enough value in time.
- destructionator 3y ago> Many projects were written in D. What's your source on this?
- nindalf 3y agoInternal document at Meta written to explain why Meta only officially supported 3 languages at the time for server side development - Hack, C++ and Python. Rust is supported as well now, bringing the total number to 4 (https://engineering.fb.com/2022/07/27/developer-tools/programming-languages-endorsed-for-server-side-use-at-meta/ https://engineering.fb.com/2022/07/27/developer-tools/progra...). The post explained why D was used at one point, but the use was phased out. I no longer have access, but if a Meta employee is reading this, I'm referring to a post that called Alexandrescu a "whirlwind of energy" in terms of how he personally encouraged and enabled teams to adopt D for projects.
- destructionator 3y agoHmm, yeah, I never saw any internal stuff (I'm just a random person on the internet), but my impression from public info is they had a few isolated individuals experiment with it on small projects but the company never formally adopted it or supported it for anything serious.
- bachmeier 3y agoFacebook didn't hire a dozen people to develop the compiler and ecosystem.
- deleted 3y ago[deleted]
- ReleaseCandidat 3y agoBtw. the "Chasm" idea is from the book "Crossing the Chasm: Marketing and Selling Disruptive Products to Mainstream Customers" by Geoffrey A. Moore D has two problems: it doesn't have enough "new" stuff to appeal to the "early adopters" - Rust has sum types + pattern matching, type classes and the borrow checker and, as you've said, it couldn't convince enough "pragmatists" to switch.
- WalterBright 3y agoD has a borrow checker, too.
- ReleaseCandidat 3y agoFor anybody interested: https://dlang.org/blog/2019/07/15/ownership-and-borrowing-in-d/ https://dlang.org/blog/2019/07/15/ownership-and-borrowing-in... You really aren't the best language salesman on earth ;). And that's great!
- WalterBright 3y agoYou're right, I'm born to be a nerd, not a salesman.
- humanrebar 3y agoRust is loved and has momentum. I'm not sure it's universally adopted by pragmatists, partly because it requires replacing pip, Maven, node, yum, or whatnot with cargo. Cargo is great if you're starting from nothing, but it's not very pragmatic to ignore all your existing code and experience and form another ecosystem within your organization. There's probably a limit to how many code ecosystems you want in your org, even in large and well-funded ones.
- nindalf 3y agoNo, you're mistaking the point about pragmatists. It's not necessary for every pragmatist to adopt it for every project in order to succeed, just a critical mass of them. In Rust's case, enough large, medium and small companies have adopted it that it continue to be a thing a decade from now. Google alone has a large vested interest in ensuring the continued development and ecosystem health of Rust, because it uses it for critical components in Android. Android isn't going away, nor will they rewrite their Bluetooth stack (https://android.googlesource.com/platform/packages/modules/Bluetooth/+/refs/heads/main https://android.googlesource.com/platform/packages/modules/B...) and Binder (WIP - https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-0-08ba9197f637@google.com/ https://lore.kernel.org/rust-for-linux/20231101-rust-binder-...) again in some other language. Now extend the same argument to the projects within AWS, Microsoft, Meta and others that depend on Rust and can't rewrite their Rust projects without a massive investment. The point isn't that all new code at the pragmatists must be written in the new language. A few critical projects are, adoption within the pragmatists continues to grow with time. This allows a new company thinking of adopting Rust to easily answer the question - "Will it be around in 10 years? Will the ecosystem still be thriving? Will it be easy to hire for this?" It's a likely "yes" to all 3, because so many pragmatists are invested in making it so (https://foundation.rust-lang.org/static/publications/annual-reports/annual-report-2022.pdf https://foundation.rust-lang.org/static/publications/annual-... - See "Member Overview"). All of these companies are literally paying tens or hundreds of thousands per year to help the ecosystem flourish.
- WalterBright 3y agoD has been around for 20+ years now.
- bryanlarsen 3y agoBesides the "pragmatist in pain" route to mainstream there's also the "benefits for free" route. C++20 is a very different language than C, but it got to mainstream because at the beginning it was "C with classes". Typescript is similar. Every company has a bunch of "early adopter" engineers. The easiest way for them to introduce something new at their company is by claiming that the transition will be seamless and free. D partially tries this path with its C compatibility. But it's a rare C codebase that doesn't use function pointers or array pointer syntax. I don't think D had any choice but to abandon those, but it made this path a lot harder. P.S. there's a third route: piggyback along with a market transition. That's how Java & Javascript & Perl went mainstream.
- WalterBright 3y agoD supports function pointers and array pointers, and always has.
- bryanlarsen 3y agoBut not in a C-compatible way, right? IIRC, you can't just take a good size C file, put a tiny bit of D in it and compile it with the D compiler, can you? Happy to be corrected.
- destructionator 3y agoTranslating small syntax differences like that are easy to do by machine if you have to.
- WalterBright 3y agoYes, it's semantically C-compatible. They're close enough that converting C code to D code manually is straightforward. But it isn't necessary to do that, you can simply import C code into D code: // D code import mycstuff; // loads mycstuff.c int main() { int* p = mycfunction(); // call C function return *(p + 1); // pointer arithmetic }
- DeathArrow 3y ago>Rust was far from perfect when it started seeing adoption by pragmatists Isn't Rust still a niche programming language? When compared to C, C++, C#, Javascript, Java, Python?
- resonious 3y agoI think in the grand scheme of things, it probably is. But it seems to have a momentum behind it that I can't quite see in, say, D or F#. Rust's popularity ratings in Stack Overflow's annual survey are pretty impressive https://survey.stackoverflow.co/2023/#section-admired-and-desired-programming-scripting-and-markup-languages https://survey.stackoverflow.co/2023/#section-admired-and-de...
- ppseafield 3y agoFor JavaScript there's been a sharp increase in the amount of tooling that is written (or rewritten) in Rust: Turbopack, SWC, Vite's upcoming rewrite of roll-up. It doesn't seem like it is competing with JavaScript for writing web applications, but the tooling is definitely seeing more adoption of Rust.
- nindalf 3y agoIn general Rust is great for writing developer tooling. You need low latency, high throughput, low memory footprint while being stable enough that it doesn’t crash much. Projects like Turbopack, Ruff (Python linter), Biome have all had some success and may continue to.
- weinzierl 3y agoIt certainly is and if alone because the corpus of all Rust software is minuscule compared to that of other mainstream languages. With Rust being in the kernel of both the most mainstream operating systems and it gaining traction in the embedded world it would require a catastrophe of gigantic dimensions to bring that tanker off course from becoming mainstream. It will take time of course, but that is no difference from other contemporary mainstream languages. I remember that Guido van Rossum being asked what he'd consider Python's breakthrough and he answered that it had none, that it just grew slowly and steadily over a long time. Now, things have been set in motion for Rust, we will see where it leads.
- p0nce 3y agoIf you read about diffusion of innovation, there is the classical example that cure for scurvy was known way before being adopted: thttps://web.archive.org/web/20151022041843/http://www.idlewords.com/2010/03/scott_and_scurvy.htm https://web.archive.org/web/20151022041843/http://www.idlewo...
- cb321 3y agoA well written and absolutely gripping & interesting tale, also discussed here at the time (including by the blog author) https://news.ycombinator.com/item?id=1174912 https://news.ycombinator.com/item?id=1174912 and re-posted many times without as much ( https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=scott%20idlewords.com&sort=byDate&type=story https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... ). Particularly striking was how concurrent innovations like copper tools, steam boats, and milk pasteurization derailed only partially developed scurvy theory. One wonders if this story partly inspired Woody Allen's joke in _Sleeper_ about steak being found to be good for you.[1] { Probably more the constant thrashing about of recommendations that has infected nutrition science since forever, though. } [1] https://www.youtube.com/watch?v=1yCeFmn_e2c https://www.youtube.com/watch?v=1yCeFmn_e2c
- epage 3y agoYou also need to take history into account - non-free compiler - GC (when Java, C#, etc already ate into that C++ segment - competing standard libraries These have been solved in different ways but diseminating that knowledge and changing people's gut feels is hard. Its then made more difficult by competitors coming out before overcoming this (e.g. Rust)
- nindalf 3y agoMissteps are fine if it’s possible to make a compelling pitch to a pragmatist in pain. But was there ever such a pitch? Not that I recall.
- dejan_lekic 3y agoCheck the year when David announced D support in GCC - https://forum.dlang.org/post/c3mnst$2htg$1@digitaldaemon.com https://forum.dlang.org/post/c3mnst$2htg$1@digitaldaemon.com . So yes, you might be right about non-free compiler until 2004. GC - you can build entire application _without_ GC. Nobody forces you to do that. Competing standard libraries are thing in the past after the Tango project has been abandoned. So really, what are you talking about?
- epage 3y agoI acknowledged that in my comment. My point is it takes a lot of work to undo the damage to people's perception and that time you lose from doing so gets your community that much further behind.
- htoadfwq 3y ago> GC - you can build entire application _without_ GC. Nobody forces you to do that. This is a gross misrepresentation. With D you must opt-out and be cognizant of libs they may or may not require GC. > Competing standard libraries are thing in the past after the Tango project has been abandoned. We are discussing why D failed adoption where the history and past are INCREDIBLY important factors. So really, what are you talking about?
- 3y ago
- germandiago 3y ago> Meanwhile Rust managed to appeal to the pragmatists by saying "we know you use C and C++ because of the performance despite the issues with it. Why don't you try a language with the same performance, which also fixes some of the issues (buffer overflows above all) at compile time". And introduces a straight jacket that avoids valid patterns from being used and makes binding C++ a hell.
- nindalf 3y agoLike I said, it doesn’t need to appeal to everyone to succeed, just a critical mass. Binding Rust to C++ isn’t easy, but the value proposition is strong enough that Firefox and Chromium (early days) projects use Rust in their massive C++ codebases. But who knows how well a language that prioritises interop with C++ will fare? I guess we’ll find out Carbon 1.0 shows up in 2025. Similarly Zig with its fantastic C interop.
- germandiago 3y agoIt can appeal niches with critical mass. Then it will not "mainstream". It will be something else.
- nindalf 3y agoI’m defining mainstream language as one that will continue to be actively developed 10 years from now, will have a thriving ecosystem of libraries and will be easy to hire developers for. If you have these three, you can start a new code base in that language today without worrying that you’ll be left with legacy software in a few years that’ll need to be rewritten. This definition of mainstream is more useful than “almost all devs know the language”, which is something that only applies to Python and JavaScript anyway. By this definition, you probably don’t want to start a new codebase in COBOL, Perl, Objective-C or other languages that are trending downwards in usage. But you can use languages that have reached that critical mass like Rust and Go, even if every single developer might not know them. I’m basing what I say on what languages developers said they knew in the 2023 StackOverflow survey (https://survey.stackoverflow.co/2023/#technology-most-popular-technologies https://survey.stackoverflow.co/2023/#technology-most-popula...). You definitely would call Java and C# mainstream, and they’re used by 31% and 28% of developers respectively. Go and Rust are used by 13% of devs. Not in the same league, but they’ve both reached critical mass so they won’t disappear.