I’ve been looking at the Rust Ownership model . The skinny is that Rust has made mostly opposite decisions from C++. Copy vs Move An assignment in Rust is by default, a move. The original variable is declared as invalid and using it will net you a hard error at compile time. The example used in the docs is: let s1 = String::from("hello"); let s2 = s1; println!("{}, world!", s1); That last line will not compile because s1 is no longer valid.
I figured I better at least start the Onyx Spec page, so I did. You can find it in the Menu. Built in types are there now. Onyx Spec
I have decided to design, and build my own computer language. It will be called Onyx. I agree, that is a pretty big task. So we will take a bit at time. Design Criteria I don’t really have a whole lot yet. You might think of onyx as C++ EXCEPT - meaning, it acts like C++ EXCEPT these differences. Over time the list will grow and I’ll turn it into a full-feature language spec.
Dynamic Exceptions have their flaws. Herb Sutter has proposed a replacement known as Static Exceptions . Lets look at it a bit. Before we do, we need to look at the C+11 feature std::error_code std::error_code and Friends Anyone who has done any coding in C knows about good old errno, the global int that many system functions will set to signal a problem. This, of course, has many problems, not the least of which is that different platforms could and did use different integer values to represent the same error.