175
Why do they keep making new languages
(lemmy.stonansh.org)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Sometimes it's easier to try a new idea in a new language (e.g. the borrow checker in Rust) rather than trying to shoehorn it into an existing language.
Rust's borrow checker is a bad example. There are already a few projects that target C++ and support both runtime and compile-time checks, not to mention static code analysis tools that can be added to any project.
Uh, they're different, though. There is no C++ tool (AFAIK) providing an exhaustive check of ALL the data lifetimes. I even think it's impossible, because their semantics are really different. Rust is move by default, C++ copy by default; Rust has no inheritance with its constructors, etc.
Your reply reads like an attempt at moving the goal post.
The initial point was "Sometimes it’s easier to try a new idea in a new language (e.g. the borrow checker in Rust) rather than trying to shoehorn it into an existing language", to which I pointed the fact that yes it's indeed possible to "try a new idea" like borrow checking, and it only takes adding a tool that runs in a post-build/unit test step. It's simpler, easier, and does not force anyone to rewrite projects from scratch.
Claiming "oh but it might not work as well" is not an answer or a refuttal.