Earlier quoted context omitted.
An std::vector is a vector in the mathematical sense, though. It's a homogeneous tuple. It's just that using an std::vector of std::vectors to store a list of points would be inefficient.
No it's not and even Stepanov, the person who gave it its name, has admitted it was a mistake: Link to lecture by Stepanov: https://www.youtube.com/watch?v=etZgaSjzqlU Furthermore in his book "From Mathematics to Generic Programming", Stepanov says that if he could change its name, he'd have named it "array".
Carbon Language: An experimental successor to C++
181–190 of 521 posts
Re: Carbon Language: An experimental successor to C++
#182If 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…
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.
Re: Carbon Language: An experimental successor to C++
#183Earlier quoted context omitted.
The major usecase for Carbon is to advance Google's internal, multi-billion line, C++ codebase. As nice as a greenfield language with a clean ffi would be, "extremely close ties to C++" is Carbon's primary benefit.
sorry for nitpicking what is likely intentional exaggeration, but multi billion can’t be anywhere near accurate, right?
Re: Carbon Language: An experimental successor to C++
#184Earlier quoted context omitted.
> A key example of this is the committee's struggle to converge on a clear set of high-level and long-term goals and priorities aligned with ours [ https://wg21.link/p2137 ]. I was frankly shocked by that goals and priorities document. The non-goals section reads like an open declaration of war against anyone whose use cases for C++ differ from GOOG and NVDA. My interpretation of Carbon is that since GOOG failed to t…
(one of the Carbon leads) Success for the Carbon Language requires it to successfully be an independent and community driven project. We may not succeed (this really is an experiment), but we're working hard to engage broadly and early in large part because of this being such an important goal and priority for us. Projects like this have to start somewhere, but can grow and become community endeavors. We are also alr…
Re: Carbon Language: An experimental successor to C++
#185Earlier quoted context omitted.
The problem with C++ is it keeps getting better. There was a time when Rust was interesting to me but then C++11 came out. Then they kept improving it
As far as I'm concerned, C++ is there for legacy purposes only. There are some nice frameworks and tools using it, sure. Yes, you are required to learn it if you are studying CS. Any serious new development today is done using more modern languages such as Rust (i.e.: the linkerd service mesh proxy [1] for encrypted pod communication in a k8s cluster). As even the Linux kernel is slowly transitioning to using Rust [2…
Re: Carbon Language: An experimental successor to C++
#186Earlier quoted context omitted.
The major usecase for Carbon is to advance Google's internal, multi-billion line, C++ codebase. As nice as a greenfield language with a clean ffi would be, "extremely close ties to C++" is Carbon's primary benefit.
sorry for nitpicking what is likely intentional exaggeration, but multi billion can’t be anywhere near accurate, right?
Re: Carbon Language: An experimental successor to C++
#187If 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…
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.
Re: Carbon Language: An experimental successor to C++
#188Earlier quoted context omitted.
The major usecase for Carbon is to advance Google's internal, multi-billion line, C++ codebase. As nice as a greenfield language with a clean ffi would be, "extremely close ties to C++" is Carbon's primary benefit.
sorry for nitpicking what is likely intentional exaggeration, but multi billion can’t be anywhere near accurate, right?
Exactly how many of them are C++ is not disclosed, as far as I know. But it is public knowledge that C++ is the biggest of Google's primary languages (C++, Java, Go, Python, Javascript, and so on).
Re: Carbon Language: An experimental successor to C++
#189It's a shame a stable ABI is declared as one of the non-goals, C++ is painful enough to integrate with other languages.
Re: Carbon Language: An experimental successor to C++
#190Earlier quoted context omitted.
An std::vector is a vector in the mathematical sense, though. It's a homogeneous tuple. It's just that using an std::vector of std::vectors to store a list of points would be inefficient.
It's not. Vectors can be added together and multiplied by scalars. That they are often represented as tuples of coefficients is just notation, doesn't matter for the notion of vectors, and vice versa: a tuple is not necessarily a vector. 1. std::vector doesn't have a fixed dimensionality, as would a mathematical vector. A fixed-length array actually makes more sense as a vector. 2. It doesn't provide the operations o…