Earlier quoted context omitted.
Yes, you can have a vector of, say, naturals. I'm pretty sure you can even create a vector field out of vectors of non-reals.
A "vector field" and a "field" are two completely different notions. (And yes, you can build a field from integers.) https://en.wikipedia.org/wiki/Finite_field
Carbon Language: An experimental successor to C++
231–240 of 521 posts
Re: Carbon Language: An experimental successor to C++
#232It's a shame a stable ABI is declared as one of the non-goals, C++ is painful enough to integrate with other languages.
C++'s current unwillingness to specify a stable ABI (or even state that ABI stability is a goal) but also have the standard libraries avoid breaking the ABI is a worst of both worlds currently. And the refusal to break the ABI adds overhead to things like std::unique_ptr which isn't really great. This paper goes into the details https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p18...
Re: Carbon Language: An experimental successor to C++
#233Earlier quoted context omitted.
A vector can't change its size or contain things that aren't elements of a field. A std::vector can.
Yes, you can have a vector of, say, naturals. I'm pretty sure you can even create a vector field out of vectors of non-reals.
Re: Carbon Language: An experimental successor to C++
#234Earlier quoted context omitted.
Doesn't C++11 precede rust?
I had the same question as you so I checked. C++ 11 standard was released in 2011 of course. Rust development started in 2006 and Mozilla announced it officially in 2010.
Re: Carbon Language: An experimental successor to C++
#235This 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
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 barriers to adoption and migration from C++. These barriers range from changes in the idiomatic design of software to performance overhead."
Re: Carbon Language: An experimental successor to C++
#236Earlier quoted context omitted.
Considering the seemingly endless list of things that deliberately don't break with the c++ legacy, new syntax is almost the only change left. And if you were about to give c++ a syntax reboot, why wouldn't you look at what successful other modern syntaxes are doing? "c++, but in a syntax for people accustomed to rust instead of in a syntax for people accustomed to C" sounds like a perfectly reasonable approach. Your…
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
Re: Carbon Language: An experimental successor to C++
#237Earlier 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…
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++
#238> The Chrome security team is working to make a cross-platform memory safe language available to Chromium developers. This document describes how to use that language in Chromium. The language, at least for now, is Rust.
Could this mean that the "at least for now" part might hint to the language discussed in this thread? Memory safety seems to be a core goal of Carbon [1]:
> Safer fundamentals, and an incremental path towards a memory-safe subset
This approach could make sense, looking at their large C++ code base in Chrome.
[0]: https://news.ycombinator.com/item?id=31830020 [1]: https://github.com/carbon-language/carbon-lang
Re: Carbon Language: An experimental successor to C++
#239Earlier quoted context omitted.
(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…
while we have you here, may I ask why is it called Carbon? It is because the symbol for atomic carbon is C ? :)
Re: Carbon Language: An experimental successor to C++
#240Earlier 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…
> you can construct a vector space out of a set of non-vectors (such as matrices)
A vector is by definition no more and no less than an element of a vector space. Vectors are defined by vector spaces, not the other way around.
If you have a vector space whose elements are matrices, then those matrices are vectors. And they will be written in coefficients in a given base as tuples.
> out of operations other than vector addition and scalar multiplication
You don't "build vectors out of operations like vector addition and scalar multiplication", as in: you don't choose them. You choose the field and dimension, and those operations (vector addition and scalar multiplication) are a consequence.
> you can use vectors for purposes other than constructing vector spaces, also without involving either of those operations
Again, you don't construct vector spaces out of vectors - there are no vectors without vector spaces. And there are no vector spaces without those operations. But yes, you can use vectors from a given vector space in a greater capacity than just as vectors.
An example, which shows the futility of looking at vectors as just tuples: a real number is a vector in the vector space of real numbers over the field of rational numbers.