Live data from Hacker News

Carbon Language: An experimental successor to C++

github.com

471–480 of 521 posts

Re: Carbon Language: An experimental successor to C++

#471
post #434

Earlier quoted context omitted.

> 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 langu…

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 suc…

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++

#472
post #467

Earlier quoted context omitted.

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 diffe…

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

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++

#473

Earlier quoted context omitted.

It really depends on what bit of computer science you are learning. C++ is definitely past its prime and has been surpassed in many areas by other languages but there are still a bunch of domains where it is the primary language.

How about almost all domains? Everything in the world runs on top of browsers/operating systems/drivers/VMs/networks/embedded systems etc. that are written in C/C++. Not to mention that the tools used to design chips and manufacture them are also written in C/C++. No other language comes even close.

Having C or C++ somewhere in the lower levels of your stack doesn't make them the primary language for your domain. Other wise CPU microcode would be the primary language of every domain.

Re: Carbon Language: An experimental successor to C++

#474
post #447

Earlier quoted context omitted.

C++++ is C# (notice how the four pluses can be arranged to form a #) C#++ would be the next one, but I'd pull what Microsoft did to Windows 9 and skip right to C##.

Knowing my music theory though, C## is just D.

not sure on this one, on my keyboard there is a halftone to get D from C so I believe it's more C# = D ?

Re: Carbon Language: An experimental successor to C++

#475

Earlier quoted context omitted.

My impression as a CS grad is that very few computer science courses require you to learn C++.

My impression is that C++ is used in the real world though. :)

Yes that is true but I'm responding to the up stream comment saying "you are required to learn it if you are studying CS". There is a common perception that computer science degrees are about learning things like C++ but my experience is that most emphasise more abstract skills like data structures, algorithms, complexity, formal program design, etc.

Re: Carbon Language: An experimental successor to C++

#476

Earlier quoted context omitted.

It's a web browser. If safety is not the one overarching concern when developing a web browser, of all things, the Chrome dev team is clearly dropping the ball. > Rust provides many of these, but not much of an incremental path there The incremental path is provided since you can refactor stuff into Rust at a scale as tiny as individual functions. Even an "unidiomatic", C/C++-like interface to "unidiomatic" unsafe Ru…

You cannot refactor C++ to Rust at the individual function level without good Rust C++ interop. The Carbon docs go into this at a sufficient level of detail; TLDR, interop paths exist but are insufficient and are actively being researched (and Chrome devs are heavily involved in said research). And as to your initial comment, of course safety is important, but if you don't understand why things like maintainability a…

No post body was provided.

Re: Carbon Language: An experimental successor to C++

#478

Why use Rust syntax (fn, x:Type, ...)? Syntax is one thing that is not so well-designed in Rust (in my opinion). Also, with the stated goals, it seems a bit unnecessary to overhaul C++ syntax, but then I found no explanation why syntax was changed. So what's wrong with C++ syntax if your goal is a successor of C++? This now looks to me like a Rust-- instead of a C++++, which is a picture they might not want to give r…

While I think rust has some serious issues with syntax (and I love rust), the things you've pointed out here are not rustisms, but programming language theory-isms.

x:Type has been used in MLs (SML, Ocaml) and recently TS. Haskells uses x::Type. This usage dates back to at least the simply typed lambda calculus in the 1930s.

fn and fun are used in SML and probably elsewhere. fun is used in OCaml, as well.

Re: Carbon Language: An experimental successor to C++

#479
post #468

Earlier quoted context omitted.

> ABI changes are fine if you build the world at every commit, but also if you don't have legacy. That's really not true and we can look at other languages to see the various amounts of un-true it is. If ABI constantly changes then what you said is possibly true, but nobody is actually proposing that. The idea instead would be breakage along a std version. Like C++23 would be an ABI break. In the same way Java has ha…

They haven't gotten along with that just fine, that GCC case is exactly what gets brought up when discussing ABI breaks, because it caused a Python 2/3 like experience around the GCC and GNU/Linux communities.

And yet everyone is successfully on C++11 & newer, and that transition still happened in a fraction of the time of the Python 2/3 transition. Nobody even mentions that when discussing modern C++, it's that much of an "everyone got over it" thing.

Re: Carbon Language: An experimental successor to C++

#480
post #470

Earlier quoted context omitted.

It really depends on what bit of computer science you are learning. C++ is definitely past its prime and has been surpassed in many areas by other languages but there are still a bunch of domains where it is the primary language.

In fact there is plenty that can be expressed only in C++. A person making effective use of the power of the language finds anything else a huge step down. Anyone not having fun when coding C++ is doing it wrong.

[deleted]
Post reply on HN