News for hackers. Stuff that matters.
Re:D’s Newfangled Name Mangling by maxxxxx on Wednesday December 20, 2017 @07:01PM (#15975092)
"- D is backed by... D users... and the two language architects."

How did Stroustrup get C++ popularized? It's pretty phenomenal that it got so popular.

Re:D’s Newfangled Name Mangling by pjmlp on Thursday December 21, 2017 @01:43AM (#15976918)
UNIX vendors adopted it as sister language to C, given its origins at AT&T.

All C compiler vendors for MS-DOS adopted it. Borland ported their Turbo Vision framework from Turbo Pascal to C++.

Apple gave up to pressure from external devs and moved from Object Pascal to C and C++ with PowerPlant framework.

On OS/2 and Windows it became the language to write GUIs. Harcore C devs would stick to the low level APIs, whereas we would use CSet++, OWL, VCL, MFC.

On UNIX CORBA started to get adoption, and no sane person would use it in pure C.

Likewise we had COM and DCOM on Windows, and SOM on OS/2.

Re:D’s Newfangled Name Mangling by katastic on Wednesday December 20, 2017 @10:04PM (#15976070)
Well, I would venture that there was much less competition back then and fit a very important middle ground. Per wikia:

>Stroustrup found that Simula had features that were very helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level to be suitable for large software development.

And C++ was also created at the same place as C... Bell Laboratories so (while I wasn't alive then) I think people saw "the next product" coming from Bell and were interested in the next C upgrade--an extension to a product they were already widely using.

https://en.wikipedia.org/wiki/C%2B%2B#History

[edit] I found a great, large PDF that details LOTS of C++ history.

http://www.stroustrup.com/hopl2.pdf

    C++ use
    Date estimated number of users
    Oct 1979 1
    Oct 1980 16
    Oct 1981 38
    Oct 1982 85
    Oct 1983 ??+2 (no Cpre count)
    Oct 1984 ??+50 (no Cpre count)
    Oct 1985 500
    Oct 1986 2,000
    Oct 1987 4,000
    Oct 1988 15,000
    Oct 1989 50,000
    Oct 1990 150,000
    Oct 1991 400,000
C++ appears to be similar to D in terms of users, until corporate backers (AT&T!) came online and started pushing it with "traditional marketing", over that of e-mails and newsgroups.

>electronic communication played a crucial role in this. In the early years most distribution and all support was done using email and relatively early on newsgroups dedicated to C++ were created (not at the initiative of Bell Labs employees) that allowed a wider dissemination of information about the language, techniques, and the current state of tools. These days this is fairly ordinary, but in 1981 it was relatively new. I think that only the spread of Interlisp over the Arpanet provides a contemporary parallel. Later, more conventional forms of communication and marketing arose. After AT&T released Cfront 1.0 some resellers, notably Glockenspiel in Ireland and their US distributor Oasys (later part of Green Hills) started some minimal advertising in 1986, and when independently developed C++ compilers such as Oregon Software’s C++ Compiler (developed by Mike Ball at TauMetric Software in San Diego) and Zortech’s C++ Compiler (developed by Walter Bright in Seattle) appeared ‘C++’ became a common sight in ads (from about 1988).

Also, trivia piece: "Zortech's C++ Compiler, developed by Walter Bright in Seatle." That's the same Walter Bright who designed D. He also was the creator of a very popular mainframe game from the 1970's called Empire.

https://en.wikipedia.org/wiki/Walter_Bright

D also had a couple of "smears" or "growing pains" that pushed some people away. D was originally a closed-source language that pushed many in the FOSS community away. Then, the standard library was lagging in progress so the community made their own "Tango". But eventually Phobos (the main stdlib) overtook it and now everyone uses only that. However, during that time "two stdlibs" split the already small community and duplicated efforts. The last "smear" I can think of is the garbage collector which gives C/C++ and other system programmers pause because it's a fear of the unknown and the GC hasn't been "proven" with dozens of shipped commercial applications.

On the plus side: The GC is completely deterministic with when it will fire off, and people have been working to remove the GC (as it's not actually TIED to the language, but the stdlib. As opposed to say, C#, which IIRC, would be IMPOSSIBLE to use without a GC.) There are plenty of articles online with people removing GC (it's even a simple pragma), or partially removing it during critical sections, or straight up removing the entire D runtime for embedded purposes. All of which have been completely successful and not "that hard" to do since they're not that coupled together. And lastly, of course, the GC isn't that slow unless you're doing crazy allocations (add one element to an array 100,000 times) and systems programmers don't program like that anyway.

Hell, I still prefer RAII. The GC only kicks in for stuff I don't care about like lambdas/closures, string/array manipulation, and functional algorithms. But I can absolutely use static arrays allocated on the stack with a single line of code. (You can even use malloc for non-GC touched data and alloca for stack allocations). There's no way I could do that in C#.