News for hackers. Stuff that matters.
Re:Carbon Language: An experimental successor to C++ by pron on Tuesday July 19, 2022 @02:38PM (#32156043)
> Rust (from my biased point of view) is currently on its way to become the standard low-level language

The evidence seems to suggest the opposite. Other than a lot of talk on programming fashion publications that are always more aspirational than representative (such as this site) Rust seems to have reached 0.3% of the market [1], up from 0.1% a couple of years ago [2], and while that is ok growth, programming languages with few exception tend to reach, approach, or at least point toward their all-time peak market penetration around age 10, and Rust is already 7. Any language could, of course, be an exception to historical trends, but there's nothing to suggest that is the case.

More anecdotal adoption stories are just as bleak. Even at this relatively advanced age, many companies dabble in Rust — as they did in, say, Haskell — but not many established companies have yet to really bet big on it.

The only positive is that among the low-level languages discussed on aspirational sites, Rust is, indeed, the most talked-about language, but history also suggests that that is a very bad predictor of long-term market success.

[1]: https://www.devjobsscanner.com/blog/top-8-most-demanded-lang...

[2]: https://www.hiringlab.org/2019/11/19/todays-top-tech-skills/

Re:Carbon Language: An experimental successor to C++ by cogman10 on Tuesday July 19, 2022 @03:00PM (#32156331)
> programming languages with few exception tend to reach, approach, or at least point toward their all-time peak market penetration around age 10

Notable exceptions from the links you've provided:

C#, Java, Go, PHP. All appear to have an upward trajectory today.

Javascript has also seen a similar penetration boost when nodejs came on the scene.

With rust looking to get integration both into the Linux kernel and GCC, that points to some pretty positive things for the language's penetration. Particular in the embedded world.

Re:Carbon Language: An experimental successor to C++ by pron on Tuesday July 19, 2022 @03:13PM (#32156525)
> All appear to have an upward trajectory today.

They might have an upward trajectory, but they're not posed to break well beyond their respective records. With the possible exception of Python, how popular a language is at age ten is a reasonable rough indicator of how popular it's ever going to be. At its current growth rate Rust would reach 1% market share at age ten. Again, there can certainly be surprises, but I think it's weird to say that actual current evidence clearly points to success for Rust. On the contrary, to become a success it would need to buck the trend and be quite a surprise. So it could happen, but I don't see much to support the claim that this is what's currently happening.

> With rust looking to get integration both into the Linux kernel and GCC, that points to some pretty positive things for the language's penetration.

I agree that it shows that the language is taken seriously and isn't dismissed as a possible option, and that that's very good. That indicates that the language isn't an immediate irredeemable failure, but I don't think it's an indicator of future success.

Re:Carbon Language: An experimental successor to C++ by cogman10 on Tuesday July 19, 2022 @03:34PM (#32156815)
> That indicates that the language isn't an immediate irredeemable failure, but I don't think it's an indicator of future success.

I'd simply point to the fact that there are very few languages that have tried to get into the same space that rust exists in. Even something like D came with an optional GC which has pulled it out from consideration for things like the kernel or embedded devices.

When you say "most languages are peaked at 10 years" I'd simply point to the fact that rust is substantially different from most languages. It's not tackling the same market spaces. The ones it is hitting have been slow moving for a while now.

Re:Carbon Language: An experimental successor to C++ by pjmlp on Tuesday July 19, 2022 @04:31PM (#32157553)
While others with GC are used without issues on embedded for the last decade when users aren't stuck on ways of the past.

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

https://www.aicas.com/wp/products-services/jamaicavm/

https://www.microej.com/

https://www.astrobe.com/

https://www.wildernesslabs.co/

Ah but that isn't serious enough.

I guess battleship weapons control might be something serious,

https://dl.acm.org/doi/10.1145/2402709.2402699

Re:Carbon Language: An experimental successor to C++ by Jensson on Tuesday July 19, 2022 @04:39PM (#32157649)
Major problem with GC languages is that it is horribly to link against libraries that ships with a GC. Lets say I want to use 10 libraries, if each has their own GC then my program is now running with 10 GC's each trying to optimize itself, which isn't a tenable situation.

So system level libraries has to work without a GC, even though system level programs can work fine with a GC.

Re:Carbon Language: An experimental successor to C++ by jb1991 on Tuesday July 19, 2022 @04:50PM (#32157774)
> then my program is now running with 10 GC's each trying to optimize itself

Is this true with Java? I thought it's a single runtime that manages memory in all the code/libraries in your process.

Re:Carbon Language: An experimental successor to C++ by Jensson on Tuesday July 19, 2022 @04:54PM (#32157834)
For java the virtual machine provides the GC for everything, but then you can only use JVM libraries and not libraries in other languages.

The reason C and C++ libraries can easily be included in basically any other language is that they don't have a GC, so there are no such issues, just call the functions and things works fine.

Re:Carbon Language: An experimental successor to C++ by jb1991 on Tuesday July 19, 2022 @04:56PM (#32157855)
> Major problem with GC languages is that it is horribly to link against libraries that ships with a GC.

I'm curious which GC languages do this. The most popular ones that come to mind for me are anything on the JVM, JS, and Go, and I've never heard anyone point this out about them.

Re:Carbon Language: An experimental successor to C++ by nicoburns on Tuesday July 19, 2022 @07:40PM (#32159412)
Libraries work fine in GC languages if they're written in that language. But you can't easily take a library written in Java and import it into your Python project (you can do it, but it's not efficient, and the more languages you include the less efficient it gets). Whereas libraries written in C/C++/Rust/etc can have binding in every language without issue. Consider libraries like zlib or curl and SQLite that are ubiquitous is across every language ecosystem. Those are the libraries that need (well, greatly benefit) from being written in a non-GC language.
Re:Carbon Language: An experimental successor to C++ by Jensson on Tuesday July 19, 2022 @06:54PM (#32159035)
Every language with a GC has this problem. If you want a library to be used in both Java and Python you don't write it in either Java nor Python, you write it in C++ or another language without a GC and import that to Java and Python. Trying to import a Java library in Python or vice versa is horrible, since GC's are very hard to work with from outside the language ecosystem.
Re:Carbon Language: An experimental successor to C++ by int_19h on Monday July 25, 2022 @02:38PM (#32228959)
I don't know about Java, but it's trivial to import a .NET library in Python with a high-level mapping that takes care of everything GC-related automatically:

http://pythonnet.github.io/

I don't see any reason why something like this cannot exist for Java, if it doesn't already.

Re:Carbon Language: An experimental successor to C++ by lukaslalinsky on Tuesday August 02, 2022 @07:16AM (#32317246)
But this is exactly the point, it is possible, but once you import such library into Python, you are running both Python runtime and .NET runtime, both having their own GC implementations and many other processes.
Re:Carbon Language: An experimental successor to C++ by Jensson on Tuesday July 19, 2022 @04:35PM (#32157607)
But every language needs to get a foothold within its hype period. In a few years the hype for Rust will die down, at that point you wont get new blood unless they are forced to learn it so it will be hard to grow.

Programmers are forced to learn C++ since many jobs require it. Students were forced to learn Python since teachers choose it as a language at universities. You need some reason like this for a language to thrive after its hype cycle is over, and currently there are no such reasons forcing programmers to learn Rust and it doesn't look like there will be any within a few years either.

Re:Carbon Language: An experimental successor to C++ by pron on Wednesday July 20, 2022 @07:39AM (#32164265)
Except I didn't say "most languages are peaked at 10 years"; I said virtually all languages reached or neared the ballpark of their peak at age 10, from the most to the least successful ones, and those include C, C++, and D. I think Python might be the only counterexample. So it's always possible that some other language would be another exception, but there's nothing today to indicate that Rust is gearing to be such an exception or that it is substantially different from all the languages in all domains that have exhibited that behaviour.

I do agree that it's more likely that Rust is an exception than, say, Scala or perhaps even Go, but the same would be true for, say, Carbon. I.e. while the likelihood is higher, there's nothing at the moment that would indicate that's what's happening.

Obviously Rust has garnered more enthusiasm among PL fans than D ever did, and its peak would probably be higher, but technical enthusiasm and hype is very weakly correlated with long-term success in the world of programming languages. Most charitably you could say it's a necessary condition, but it is very clearly not a sufficient one.

Re:Carbon Language: An experimental successor to C++ by ncmncm on Thursday July 21, 2022 @07:03AM (#32177902)
Yes, Python is the only outlier.

Rust very much could still fizzle. If it does, it will be because it failed to change to be adoptable by more users. All existing users are tolerant of niche qualities. If it succeeds, the programmers who already know it will constitute less than 2% of the total, and the 98% will have picked it up after it changed to be more readily taken up.

If it fizzles, current users will always be at least 70% of the total.

So, if you want it to succeed, you will need to welcome the changes that can get it there.

Re:Carbon Language: An experimental successor to C++ by pron on Sunday July 24, 2022 @08:22AM (#32212742)
I think all new languages have some challenges that would make it very hard for them to become as popular as older languages (none of the top five languages is under twenty years old).

For one, we're long since in an era of diminishing returns — new languages have a smaller ROI compared to incumbents than the incumbents had to the languages they replaced — while the cost of a switch is the same if not higher (because codebases are larger). So switching to a new language is just not as profitable today as it was twenty years ago.

For another, the market is more fragmented today than it was, say, 15 years ago. For example, while Java is not the only game in town on the server as it was in, say, 2003-2006, no other single language shows any signs of becoming as dominant as that either. Some use Python for server-side applications, some use JS, some use C#, some use Kotlin, and some use Go. There is no single language that people flock to and so Java is still the dominant server-side language (although for a while PHP seemed like it could be it). So even if Rust does gain actual traction, it's very unlikely to become the standard low-level language. Some may use Rust, some may use Zig, some will use C++, some will use C, and maybe some may use Carbon. The only new language around that seems capable of reaching a popularity similar to ~25 year-old languages is TypeScript.

I also think Rust has a fundamental problem specific to it, and that is that it's a complex, rich, language. Rich/complex languages have never been super-popular, and while C++ is arguably more-or-less as complex as Rust, it wasn't when it gained its market share (only to lose much of it shortly after).

Re:Carbon Language: An experimental successor to C++ by ncmncm on Sunday July 24, 2022 @08:46AM (#32212924)
Yet, C++ regained share by getting more complex.

Language complexity is a poor measure. Better is the complexity of using a language to achieve an aim. C and Pascal are pretty simple as languages, but they make it substantially more complex to complete a task, because they lack the expressive power needed to help any.

C++11 is substantially more complex than C++98, but much simpler to program with. Rust is both simpler than C++ (at surface level, because it leaves behind cruft C++ cannot) but more complex because it makes greater cognitive demands (to satisfy the borrow checker) and also because it lacks powerful features C++ offers. C++ is better able than Rust to package semantics in a library and deliver that to users on command. But Rust is way, way better in that way than C.

Re:Carbon Language: An experimental successor to C++ by N1H1L on Wednesday July 20, 2022 @10:25AM (#32166217)
Yep. In fact Python really started taking off almost 20 years after its' release. People forget that Python turned 31 a few months back.
Re:Carbon Language: An experimental successor to C++ by mtlmtlmtlmtl on Tuesday July 19, 2022 @04:08PM (#32157246)
GP said the standard low-level language. Low-level code will always be a much smaller percentage of all code than the heaps of web apps our industry is shitting out on a daily basis.

Thus it would be completely reasonable for the de facto sysdev language to have a small market share overall(unless like for C/C++ there is a lot of legacy stuff to maintain) . Your sources don't shine any light on this at all.

Re:Carbon Language: An experimental successor to C++ by slingnow on Tuesday July 19, 2022 @04:41PM (#32157671)
You don't think comparing the current defacto standard low-level languages (C/C++) to Rust shines any light on the issue you raised? [1]

C/C++ : 6.17% Rust : 0.29%

This was addressed in one of the linked sources. What would you accept as evidence, then?

1: https://www.devjobsscanner.com/blog/top-8-most-demanded-lang...

Re:Carbon Language: An experimental successor to C++ by moltonel3x on Wednesday July 20, 2022 @10:20AM (#32166130)
Different metrics tell a different story. For example GitHub pull requests [1] are C++: 2.60%, Rust: 2.09%, C: 1.43%, with a clear trend showing Rust ahead of C++ next year. Or you could look at the Stackoverflow survey of languages used among professionals [2], which gives C++: 20.17%, C: 16.7%, Rust: 8.8%, with rust gaining 1-2% each year.

There's no best metric, they're all biased, you need to consider a few different ones. Otherwise you won't notice when you've stumbled upon one with with an extreme view.

Combining C and C++ in language stats is debatable, they should IMHO be measured separately. When grouped as a language category, "C/C++/Rust" is slowly becoming more common.

1: https://tjpalmer.github.io/languish/#y=pulls&names=c%2B%2B%2...

2: https://survey.stackoverflow.co/2022/#most-popular-technolog...

Re:Carbon Language: An experimental successor to C++ by cobalt on Thursday July 21, 2022 @12:42AM (#32175855)
I assume 1 is pulling only from github.com public projects. Many companies A: don't make their code public, B: probably use github enterprise/other hosted solutions (esp including not git based)

2: Also skews towards a certain demographic

Re:Carbon Language: An experimental successor to C++ by moltonel3x on Thursday July 21, 2022 @07:28AM (#32178093)
Yes, public github repos, stackoverflow survey respondents, devjobscanner offers, google searches, etc are all skewed in some way.

It's very hard to qualify the effect of those biases though: for example how does the public/private repo ratio differ between languages ? Good luck giving a trustworthy answer to that. Apart from looking at lots of different source kinds, one thing that's fairly trustworthy is the trend of a specific language in a specific source.

On that topic, looking at the "SO questions" metric of the first link, C and C++ both have a strange regular spike in the last quarter of each year. I attribute that to new CS students flocking to SO at the beginning of their term. Another fun trend to look at is the hourly google searches over a week: the weekdays / workhours spike is much more pronounced for some languages than others.

Re:Carbon Language: An experimental successor to C++ by mtlmtlmtlmtl on Tuesday July 19, 2022 @05:01PM (#32157923)
I think looking only at the number of dev jobs leaves too many potential confounding factors to be useful. For instance, how many C/C++ jobs are actually companies who need those devs to move away from C/C++? What's the overlap? How much of the C/C++ share is maintaining legacy code vs starting new projects? Sure the data says something about it, can we draw any conclusions from it other than precisely the numbers you listed? Not really, not without more detailed data.

One thing I would welcome is specifically looking at new sysdev projects over time and what languages they're in.

To be clear I'm not taking a view on whether Rust will become the standard. I really don't know, and I've yet to see anything convincing me one way or the other.

Re:Carbon Language: An experimental successor to C++ by dmix on Friday July 22, 2022 @02:47PM (#32195686)
Devops and web designer (relatively non-programmer jobs) listings also might list Javascript, Python, and Java, also maybe Ruby for Chef.

And there's a ton of those job listings.

Github repos might be a better source of penetration and use.

Re:Carbon Language: An experimental successor to C++ by pron on Wednesday July 20, 2022 @07:45AM (#32164320)
Sure, but even low-level languages have tended to reach the ballpark of their all-time peak market penetration -- however high or low it is -- around age 10.
Re:Carbon Language: An experimental successor to C++ by mek6800d2 on Tuesday July 19, 2022 @04:08PM (#32157253)
"... around age 10." C++ (not to mention C)? IIRC, I remember seeing B.S.'s "C with Classes" appear in ACM SIGPLAN Notices in the early 1980s -- 40 years ago. I don't think it hit its peak 10 or even 15 years after its early development. Given that it's C++, that's a pretty major exception.
Re:Carbon Language: An experimental successor to C++ by Jensson on Tuesday July 19, 2022 @04:22PM (#32157430)
C++ was huge in the 1990s, C++'s share is probably smaller today than back then since so much of programming has moved over to managed and scripting languages.
Re:Carbon Language: An experimental successor to C++ by pron on Wednesday July 20, 2022 @07:46AM (#32164334)
If C++ hadn't already hit it's all-time peak market share in 1995, it was certainly well inside the ballpark. It's far from an exception.
Re:Carbon Language: An experimental successor to C++ by nemothekid on Tuesday July 19, 2022 @03:38PM (#32156874)
>programming languages with few exception tend to reach, approach, or at least point toward their all-time peak market penetration around age 10

How are you coming to this conclusion? I can think of more counter examples than actual examples (Almost every language on the top 10 aside from PHP where close to peak market penetration at age 10).

Re:Carbon Language: An experimental successor to C++ by nicoburns on Tuesday July 19, 2022 @07:43PM (#32159443)
I think the low-level world moves slower.

Key players like Microsoft and the Linux Kernel developers are only just beginning to pick up Rust. It's been considered promising, but immature for much of it's lifetime, and it's only recently gotten to the point that it's considered mature enough for core infrastructure projects (which are really it's forte) in the last couple of years.

Re:Carbon Language: An experimental successor to C++ by agumonkey on Tuesday July 19, 2022 @03:03PM (#32156375)
I don't think rust is headed to be the norm, but I don't think it should be compared to most mainstream languages. It's not python/php/ruby.. it's a very difficult niche where a lot of efforts failed flat.