The authors of Val state:
> Our goals overlap substantially with that of Rust and other commendable efforts, such as Zig or Vale
The authors of Val state:
> Our goals overlap substantially with that of Rust and other commendable efforts, such as Zig or Vale
If not then are we implying a successor to C++ needs to be Object Oriented? Because that's the main difference between C++ and C. Clearly the successor languages mentioned in the article do not have the same heavy OOP bias embedded into themselves as C++ and thus they all can be looked upon as successors to C as well.
I think the goal here is just to find a language that does the whole "zero cost abstraction" thing better than the status quo.
I don't think you need to be fully OOP to claim to be a C++ successor, but you definitely need to have decent zero cost abstractions, including a form of templates/generics. Having RAII might also be a requirement.
https://en.wikipedia.org/wiki/Polymorphism_(computer_science...
You will see Wikipedia doesn't treat it as such. Examples are shown in functional languages and it is not hierarchically categorized as a exclusively a part of OOP.
"In a 1985 paper, Peter Wegner and Luca Cardelli introduced the term inclusion polymorphism to model subtypes and inheritance,[2] citing Simula as the first programming language to implement it"
Polymorphism is part of what makes a language OOP capable, naturally it also exists in other paradigms.
We can also do other examples like discussing the semantics of closure and methods equivalency.
https://wiki.c2.com/?ClosuresAndObjectsAreEquivalent
Do you also want Simon Peyton Jones point of view on Haskell type classes and OOP relate to each other?
"Classes, Jim, but not as we know them"
https://www.microsoft.com/en-us/research/publication/classes...
Polymorphism is not part of OOP it's much more universal then that. It can be used by OOP the same way numbers can be used as in OOP programming. But numbers are not hierarchically under the umbrella of OOP.
I mean what is the point you're trying to make here? That polymorphism is fundamentally and categorically OOP? Are you saying that anything that uses polymorphism (which is almost every language under the sun) is OOP?
>Do you also want Simon Peyton Jones point of view on Haskell type classes and OOP relate to each other?
No? Wouldn't that be a completely different topic?
Not the OOP from all I know is Java, rather the OOP from SIGPLAN, ECOOP, IEEE, ACM papers, which happen to have polymorphism as one of the common features across all variations of what can be considered as an OOP capable language.
All things considered, for the time, given the paradigms we understood to be effective, and for the value within the design space, C++ was about as close to excellence as we could’ve hoped for. It didn’t replace C, nor was it meant to, but for its purpose it was a great success.
One thing I highly disagree with in your statement is this: " C++ was about as close to excellence as we could’ve hoped for."
In my opinion, C++ is nowhere close to excellence. Best available option for certain applications is more inline with my opinion of it.
It’s fine to disagree, but it seems mildly disingenuous to omit all the qualifiers I (very deliberately and intentionally) prefaced that statement with when you do so. In that sense, you’re actually disagreeing with an opinion I don’t actually hold.
>All things considered, for the time, given the paradigms we understood to be effective, and for the value within the design space, C++ was about as close to excellence as we could’ve hoped for. It didn’t replace C, nor was it meant to, but for its purpose it was a great success.
I disagree with this entire statement. It's not even close to excellence even given all the deliberate and intentional qualifiers you put around it.
I believe that when I re-clarify my comment in this context it becomes clear that I am in totality disagreeing with your statement.
I think C++ became popular due to luck in the same way javascript came to dominate the frontend. I believe there could've been a number of possible better alternative outcomes if luck would have been different.
Torvald's anti-C++ rant was full of factual errors when he wrote it and it hasn't improved with age.
If you want to point to "smart people claiming C++ was a mistake" you need to actually use people who actually know & have experience with C++ in the first place - which isn't Torvalds.
There's also other smart people, like John Carmack, who have been converted from C to C++ and now prefer the later especially for working in a team environment. C++ is far from perfect, but there's also pretty strong arguments that it does still represent an improvement over C on average. Yet (almost) nobody argues that C was a mistake.
Agreed. Here is Wikipedia article on criticism of C++. https://en.wikipedia.org/wiki/Criticism_of_C%2B%2B
The second sentence has a short list of some of the smart people who don't like it: "Among the critics have been: Robert Pike, Joshua Bloch, Linus Torvalds, Donald Knuth, Richard Stallman, and Ken Thompson". I'll leave it up to the reader to research why they criticize C++ (not C). However in the references there's a good article from Rob Pike:
https://commandcenter.blogspot.com/2012/06/less-is-exponenti...
Rob Pike's post there, for example, absolutely never comes anywhere close to calling C++ "a mistake."
Torvalds has ranted about many things he knows nothing about and this is no exception. His opinions belong in the trash bin and should be ignored, not used as evidence.
Also function and operator overloading, often overlooked while being of critical importance.
Source: https://www.stroustrup.com/ETAPS-corrected-draft.pdf
Search for "Zero-overhead abstraction mechanisms".
If you read it you will see Bjarnes goal was to provide the highest level of abstraction possible at "zero overhead". At the time he was creating the language, OOP was the newest and "highest" forms abstraction around... problems with it as an abstraction weren't as evident back then as they are now.
But yeah, I agree that you can make an argument for RAII and templating being the main differences over OOP. But Zero cost abstractions are not a side effect at all.
For example, the STL is everything with a sprinkling of OO. Generics and template metaprogramming are everywhere. Algorithms are defined as distinct for data structures IN ADDITION TO object methods. It is simultaneously elegant and monstrous.
Once the diamond inheritance pattern for iostreams emerged, there was a HARD turn away from OO in the standards body. C++ is literally the embodiment of every programming trend for the last 30 years.
Other than that, the whole title of the article is manipulative. It's not a fair and balanced examination of all the possible successors of C++. The author admits he works on Val, and the article is obviously promoting Val as superior to other alternatives.
And it gets even better! There's VALE (Verified Assembly Language for Everest) and two Vlangs ;)