Why are there so many programming languages? And why are there still being so many made? I would think you would try to perfect what you have instead of making new ones all the time. I understand you need new languages sometimes like quantumcomputing or some newer tech like that. But for pc you would think there would be some kind of universal language. I’m learning java btw. I like programming languages. But was just wondering.

  • 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.

      •  lysdexic   ( @lysdexic@programming.dev ) 
        link
        fedilink
        English
        3
        edit-2
        11 months ago

        There is no C++ tool (AFAIK) providing an exhaustive check of ALL the data lifetimes.

        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.