back to article Facebook is writing a Mercurial server in Rust. This is not a drill

Between Git and Mercurial, the two most popular distributed version control systems in use today for managing software development, Git gets most of the attention. Git was created by Linus Torvalds, which gives it a pedigree. And it has benefited from the popularity of commercial services built around the technology, like …

  1. Chewi
    Thumb Up

    They stole my idea

    Okay, maybe not, but I swear I had that hg absorb idea a couple of weeks ago. I use Git almost exclusively though. I've used Mercurial on the odd rare occasion for free software projects I was contributing to but I never quite got it. I think a lot of it simply boils down to a difference in terminology. A little competition between the two is healthy.

    As for Rust, I haven't taken the time to learn it yet but I have had a gut feeling that it could go on to do great things. This work certainly sounds like it's being put to good use.

    1. Fruit and Nutcase Silver badge
      Joke

      Re: They stole my idea

      @Chewi

      Would you like 65million dollars?

    2. DrXym Silver badge

      Re: They stole my idea

      Mercurial and Git are so similar that I expect the transition from one to the other is pretty easy. The main reason I'd stick with Git is that it has some excellent front-ends and IDE integration is extremely good. I think if Git didn't exist though we'd be all on Mercurial and completely happy about it too.

      As for Rust, it has the potential to be massive but whether it'll reach that potential remains to be seen. I've written a fair amount of code in it and the main takeaway is that code samples look simple but try to write some and it REALLY punishes you at the compile phase. You have to get your lifetimes and borrowing right. But once you do it produces code which is extremely hard to break in the ways that C or C++ would allow - memory leaks, dangling pointers, buffer overflows, data races etc.

      That makes it perfect for systems programming but also for security software, network stacks and so on where (deliberately) malformed or corrupted data could break a C++ program. If I were writing anything to do with IoT or with a safety / performance critical function and I was starting from fresh I'd definitely consider Rust.

      1. Anonymous Coward
        Anonymous Coward

        Re: They stole my idea

        Rust is one of the few new languages that looks like a viable replacement for C++. Supposedly it performs comparably and isn't stuffed with pointless "innovations". @DrXym you say "it REALLY punishes you at the compile phase" but you could say the same of C++ or Haskell. Is Rust that finicky?

        If Rust is any good, I worry that Mozilla and early adopters like Facebook and Unity (the game engine) will lead it astray. I associate all three with crap code, bloat, and dubious corporate agendas.

        1. DrXym Silver badge

          Re: They stole my idea

          "but you could say the same of C++ or Haskell. Is Rust that finicky?"

          It's not finicky, it's *anal*. I've never programmed in Haskell but C++ doesn't care if you:

          * forgot to delete some object

          * call a pointer to an object that is already deleted

          * don't lock a data structure shared by two threads causing race conditions

          * use references to something which has gone out of scope

          * use implicit default copy constructors & assignment operators that don't work on a class with internal pointers

          * forgot to make a destructor virtual

          * didn't make your class exception safe, including in its constructor / destructor behaviour

          * write off the end of a buffer

          Rust will kick your ass if you try anything like this and the language is designed to outright prevent some of these issues. Once you write code the compiler accepts it generates code with comparable speed to C++.

          1. Anonymous Coward
            Anonymous Coward

            Re: They stole my idea

            So, uh, what are you complaining about? Does it stop you from doing anything you'd actually want to do? Is it possible to turn off the checks if you want to do some quick prototyping?

  2. ratfox
    Trollface

    Git is great

    I never had a problem using it since I found the man pages on the web.

    1. Anonymous Coward
      Anonymous Coward

      Re: Git is great

      That's the clearest description of the "--fondle-invade-head" flag I've seen yet.

  3. John Smith 19 Gold badge

    Oh, for a moment there I thought pish was a programming language.

    Sadly it's not.

    But there are a Push and a Fish language.

    Perhaps they could be merged?

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2021