Live data from Hacker News

Carbon Language: An experimental successor to C++

github.com

271–280 of 521 posts

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

#272

If you are like me and wondering "What makes carbon different from Rust or Zig? 1. The ability to interoperate with a wide variety of code, such as classes/structs and templates, not just free functions. 2. A willingness to expose the idioms of C++ into Carbon code, and the other way around, when necessary to maximize performance of the interoperability layer. 3. The use of wrappers and generic programming, including…

Which is what D can do. D can (and does) interact successfully with C++ classes and member functions. Even templates!

dlang would have been a very serious contender to C++ had it been fully nogc, stable & lean. Also dlang unnecessarily suffered low adoption in start due to competing stdlibs, trying to be both Java & C++ at once.

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

#273

Earlier quoted context omitted.

Which is what D can do. D can (and does) interact successfully with C++ classes and member functions. Even templates!

dlang would have been a very serious contender to C++ had it been fully nogc, stable & lean. Also dlang unnecessarily suffered low adoption in start due to competing stdlibs, trying to be both Java & C++ at once.

I am still a big fan of both dlang & pascal & very hopeful of dlang's Bright future ahead.

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

#274

This is the 3rd language I know about that google created. I have no idea why they don't use rust with their C++ code base and I don't know why they made this instead of use zig which actually brings something new to the table. Overall I don't see myself using this. 0/3 google

There is an entire document which explains why they can't use rust or zig. The short version is that for their particular usecase they need really close ties to C++. "Existing modern languages already provide an excellent developer experience: Go, Swift, Kotlin, Rust, and many more. Developers that can use one of these existing languages should. Unfortunately, the designs of these languages present significant barrie…

I guess I'll rewrite my original comment here to clarify

I don't know why google created this language. It offers nothing new and I can't see why they'd use this over rust when rust can be used. I don't see why they use this over zig since zig can certainly be used where this language is meant to be used. Zig actually brings something new

Overall google is 0/3 on creating languages that people want to use. Maybe go is useful but I haven't seen enough proof

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

#275

If you are like me and wondering "What makes carbon different from Rust or Zig? 1. The ability to interoperate with a wide variety of code, such as classes/structs and templates, not just free functions. 2. A willingness to expose the idioms of C++ into Carbon code, and the other way around, when necessary to maximize performance of the interoperability layer. 3. The use of wrappers and generic programming, including…

For once if they would have focused on compile times that would have been a very valid reason to switch.

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

#276

Earlier quoted context omitted.

2. I'm not sure I understand you here. A vector is defined by those operations. A set without those operations, even if it has the same elements, is not a set of vectors anymore. I don't understand your remark about sets here. The correspondence is necessary, because those operations on vectors are induced from the operations of the relevant field of scalars. The operation of adding vectors of bank numbers would be i…

A vector is defined as I did above. It's a homogeneous tuple, i.e. the Cartesian product of n sets, where all sets are the same. Vector addition plus scalar multiplication are not part of the set. Usually they're part of the definition of a vector space. E.g. (R^2, +, ⋅). But you can construct a vector space out of a set of non-vectors (such as matrices), or out of operations other than vector addition and scalar mul…

A vector is definitely not defined as you did above.

A vector is an element of a vector space, basically anything that you can add together and multiply with an element of a field. It has nothing to do with what you wrote above.

[] : https://en.wikipedia.org/wiki/Vector_(mathematics_and_physic...

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

#277

No. No. No. This reminds me of Dart - another big company thinking they can invent a new language to tackle old language problems. This is not the way to improve C++ - because this path already exists, either as D or if compatibility or OO model isn't an issue, Rust. C++ has been improving slowly but surely - just remember that 90% (heck even more) of C++ issues stem from the hell that's compatibility with C and that…

Google is in the business of making software in exchange for money and they have internally determined that the way C++ is and the direction C++ is headed isn't good for them. They don't "care" about C++, they care about running a business. They have determined that C++ as it is isn't sufficient and the direction its going is not acceptable to meet long term goals, whether that be implementing new products or maintaining existing software. Google has wholly unique software organization problems that very few other companies probably have.

If you've seen their cppcon talks, you'll see that the changes they want are not what the committee (or even the general c++ community) focuses on (for example, I couldn't care less about ranges). For example, they want to make changes to unique_ptr because the inefficiencies in the ABI cause performance issues and probably can be tracked to additional cost per month. They couldn't make these changes without changing ABI. At google scale, small inefficiencies add up so fast.

I have no doubt they looked at D and saw that it wasn't feasible (for whatever reason) and they already stated why Rust is not sufficient. They wouldn't make this decision arbitrarily and we are not privy to all the meetings that went into the decision making process.

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

#278
post #226
post #72

Earlier quoted context omitted.

The syntax looks a lot like Rust, though. I'm surprised they made such a break when there explicit goal is to make migration from C++ as easy as possible. Also, Rust (from my biased point of view) is currently on its way to become the standard low-level language, so I'm not too confident that Rust-but-with-OO is enough of a selling point.

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

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

#279
post #226
post #72

Earlier quoted context omitted.

The syntax looks a lot like Rust, though. I'm surprised they made such a break when there explicit goal is to make migration from C++ as easy as possible. Also, Rust (from my biased point of view) is currently on its way to become the standard low-level language, so I'm not too confident that Rust-but-with-OO is enough of a selling point.

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

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

#280
post #252
post #13

Earlier quoted context omitted.

A developer familiar with C++ may believe it to be a fixed length container (perhaps with automatic bounds checking[0]) and treat it as such in memory/security/performance critical sections. 0: https://en.cppreference.com/w/cpp/container/array/at

And if they named it “vector”, a developer familiar with mathematics might believe it to be a vector.

Which is not a footgun.
Post reply on HN