Something something history is a flat circle
-
How can you not have memory-safety while also having a garbage collector?
Garbage collection means that all objects live as long as you have a reference to it. Which means that you can only dereference a pointer to invalid memory if you willingly create an invalid pointer, or reinterpret the type of one pointer into another. Going out of bounds of an array counts as the first case.
If a language has garbage collection but no compiler/interpreter supports it, then the language doesn't have garbage collection.
wrote on last edited by [email protected]I've gotten segfaults in python with only the standard library
-
K&R started with BCPL as their base of inspiration. They then made B, and then C. The followup should be called P.
Some people really suck at coming up with names for their programming languages. There are so many single letter languages (B, C, D, E, F, J, K, V...) that it really makes one wonder what the fuck is wrong with them
-
It looks like a nice mix of some of the worst design choices of C++ with some of the most dubious choices of Rust.
Oh, so it's a contender against Brainfuck
-
This post did not contain any content.
Zig or V could've been shown instead of Carbon (the lone C)
-
Some people really suck at coming up with names for their programming languages. There are so many single letter languages (B, C, D, E, F, J, K, V...) that it really makes one wonder what the fuck is wrong with them
These days, search engine optimization tends to force new single letter languages into obscurity. Even Go would have issues there if Google hadn't been behind it.
-
These days, search engine optimization tends to force new single letter languages into obscurity. Even Go would have issues there if Google hadn't been behind it.
Even in the early 2000s, those single letters would be awful as lone search terms
-
I’ve never used Rust but from my very cursory knowledge of what the borrow checker entails, it wouldn’t add so much to Ada.
Use of pointers is already strongly discouraged by the simple fact that the language is designed to rarely truly need them. Besides, the compiler itself chooses automatically whether to pass data by value or by reference depending on the required results and what is most efficient. You can also specify parameters passed to a function as read-only. Finally, another thing that Ada does to prevent yourself shooting in your foot is to enforce strong encapsulation of functions and data.
Overall, one way to put it in simple terms is that Ada requires the programmer to give enough information to the compiler so as to ensure that it actually outputs what you want it to, which as far as I understand, is sort of what the borrow checker is there for. The downside to the Ada approach is that it is very verbose, but with the kind of code editing capabilities we have nowadays it’s certainly not as much a hassle as it was when Ada came out.
Anyways, I suspect that both languages are different enough in overall paradigm that trying to solve problems in Ada the way you would in Rust would probably be quite frustrating and give rather poor result.
The borrow checker is a lot deeper than merely making pointer use a bit safer; it provides a model for data ownership based on affine types.
Also, to the extent that "Ada requires the programmer to give enough information to the compiler so as to ensure that it actually outputs what you want it to," if I understand you correctly, that is basically true of every language with a static type system. At the extreme end, we have dependently typed languages which essentially let you express arbitrary mathematical propositions in your types and, if the program compiles, then you know that they will always be satisfied without having to do any checks at runtime.
-
These days, search engine optimization tends to force new single letter languages into obscurity. Even Go would have issues there if Google hadn't been behind it.
That's why you put the "-lang" postfix if you have issues with searching for documentation of functions, etc.
-
The "better" performance is due to the built-in multi-threading support, and that functional programming makes it relatively safer to pull off. Otherwise single-threaded Rust is very hard to optimize.
Rust has monomorphisation like C++ and every function has the aliasing guarantees of restrict, a keyword rarely seen in C code bases use and C++ doesn't even support.
This means you can get more optimisations while writing in an intuitive style, where C/C++ requires some changes to the code.On the other hand rustc has some hiccups with argument passing and rvo. One could argue that that's just the compiler while the aliasing problems are part of the language in the C/C++ case, but while there is only one rust compiler its performance is the languages performance.
For most use cases they are about equally fast.
-
That's why you put the "-lang" postfix if you have issues with searching for documentation of functions, etc.
Can't find a lot searching for java-lang...