3 ms·
Interesting. It will obviously take off _because Google_ but since they're heavily influcened by the Rust syntax, why not just learn Rust instead. They'll need
by secondcoming 4y ago
Interesting. It will obviously take off _because Google_ but since they're heavily influcened by the Rust syntax, why not just learn Rust instead.
They'll need to get it into Compiler Explorer so people can really look at codegen rather than porting small programs.
- visheshdembla 4y agohttps://carbon.godbolt.org/ https://carbon.godbolt.org/
- secondcoming 4y agotremendous!
- saghm 4y ago> since they're heavily influcened by the Rust syntax, why not just learn Rust instead Interestingly, when looking at their code samples, the vibe I get is more "Go++". Using `var` for variable declarations, letter casing for visibility, explicit returns even at the end of functions, using the "package" keyword for namespacing, etc. I do see some superficial syntactic similarity to Rust, like using `fn` for functions and `->` to annotate return types, using `:` for type annotations for variables, and semicolons seeming to be required at the end of lines, but overall it doesn't really _feel_ that much like Rust to me, I think due to how imperative it seems. Given the use of `class` and `let/var` seeming to be const versus mutable bindings, I'm wondering if the Rust resemblance is actually just transitive through more of a resemblance to Swift, although I don't know Swift well enough to know if this is an accurate explanation.
- kllrnohj 4y ago> but since they're heavily influcened by the Rust syntax, why not just learn Rust instead. That's pretty extensively covered in the link, but here's a relevant snippet: "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."
- unrealhoang 4y agoAs stated in their goals, they want Carbon to be semantically compatible with C++ so Carbon code can use (automatically rewrite) C++ libraries.