Live data from Hacker News

Programming languages endorsed for server-side use at Meta

engineering.fb.com

71–80 of 302 posts

Re: Programming languages endorsed for server-side use at Meta

#71

It's curious not to see any JVM language there. Scala isn't even mentioned. Probably the data size is so high that the only way to survive there is to write everything in low level C++ or Rust.

> Probably the data size is so high that the only way to survive there is to write everything in low level C++ or Rust. Except they say: “For data science, ML applications, and Instagram, Python continues to be the language of choice, and we continue to invest in the experience with this ecosystem.”

For research you use Python or whatever. For production you compile your models to whatever their proprietary equivalent to TorchScript and ONNX is, which is surely executed by hyperoptimized C++/Rust/Cuda code.

Re: Programming languages endorsed for server-side use at Meta

#73
I'm very surprised that C++ is one of the recommended languages for backend services. I occasionally am interested in learning C++ but with my context as a web developer I find it doesn't really fit any of my use cases.

How would one go about building a rest service in C++? Do you have to write everything yourself or are there libraries and frameworks. I did some light looking into it after reading the article but I would love to hear from folks who actually do it and what the state of the art is for C++ web services.

Re: Programming languages endorsed for server-side use at Meta

#74
post #56

> Meta’s primary supported server-side languages are Hack, C++, Rust, and Python. > For specific use cases, we support other languages, including Java, Erlang, Haskell, and Go Makes sense. Python because ML. Rust because of performance. C++ and Java because all-the-things. Go because 75% of all cncf.io projects are Go. Haskell because elitism. Erlang because stability. /s I think the real story is that migrating off…

> Haskell because elitism Was there really a need for this comment? How about: for correctness and expressivity

What you offered up is pretty close to the meaning of elite.

Re: Programming languages endorsed for server-side use at Meta

#76
post #2

I am excited to see Rust gaining popularity and becoming a first-class language at Meta.

> Rust gaining popularity As it should. Beyond that though. How relevant even is Meta anymore? They are a dying company aren’t they? Facebook hasn’t been relevant in ages. Instagram is losing footing too. Only way I can see them maintaining relevance is if one or more of the following happens: - They turn out to be right in their bet on VR and Metaverse. Personally I doubt it, and I think VR and Metaverse is closer a…

> Beyond that though. How relevant even is Meta anymore? They are a dying company aren’t they? Facebook hasn’t been relevant in ages. Instagram is losing footing too.

The lies and the media reports of the so called death of the fastest company to reach $1 trillion dollars in the 21st century has been greatly exaggerated. Especially with having platforms with 1 billion+ users each.

Meta has plenty of cash and revenues to sail though this decade. And no. Your social circles and anecdotes is not evidence.

Re: Programming languages endorsed for server-side use at Meta

#77

> Meta’s primary supported server-side languages are Hack, C++, Rust, and Python. > For specific use cases, we support other languages, including Java, Erlang, Haskell, and Go Makes sense. Python because ML. Rust because of performance. C++ and Java because all-the-things. Go because 75% of all cncf.io projects are Go. Haskell because elitism. Erlang because stability. /s I think the real story is that migrating off…

Hack because?

Legacy.

Re: Programming languages endorsed for server-side use at Meta

#78
post #68

Earlier quoted context omitted.

> I’ve been holding off learning Rust. Rust is quite an easy language to learn and a pleasurable language to use, due to its modern ergonomics and internal consistency. Give it a try. The only trick is that Rust newcomers actually need to read up on Rust borrow checker and lifetime annotations first, as opposed to learning Rust only through hacking with it. Those two concepts are unique to Rust and need to be well un…

I don't think Rust is easy to learn, it's has a kind of famously steep learning curve. The tooling is great which helps, but it's not easy for new-ish systems programmers.

Yeah, I have to agree with this. I tried to get my team at my previous work to adopt Rust, and they all pretty much failed to really pick it up. Granted they weren't the most talented group I've worked with.

Re: Programming languages endorsed for server-side use at Meta

#79
post #51

What's always been interesting about the languages Meta uses is the story of the rise and fall of the D programming language at Meta. I wasn't around at the time when Andrei was working there and advocating for its adoption, but it seemed like he hit a wall at some point. By the time I joined all D services were being deprecated or rewritten. Rust seems to be doing far better. Though it's also worth noting that Go ne…

Would be interesting to hear what their issue with it was if someone knows.

Re: Programming languages endorsed for server-side use at Meta

#80
post #30

“Since we began our journey with Rust, the number of projects using Rust inside Meta has increased at an accelerated rate” That almost sounds like an endorsement. I’ve been holding off learning Rust. However, it seems like Rust adoption is reaching a tipping point.

Yep, and its pretty much going to become the next C++ - i.e widely adopted at first, and driven into a shit state. Specifically because of this

https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html

This needs to exist in Rust for it to get adopted, because forcing good developers to get explicit with code for memory safety when they are doing simple operations is going to result in them ignoring the language.

So eventually code bases are going to be exactly like C++ code bases - C++ has a standard library and smart pointers that eliminate a lot of errors with dangling pointers, and if people use those exclusively (or better yet, the language disallowed any C style pointers or arrays), the language would be dramatically more safe.

If you want to improve development, focus on smarter compilers/interpreters, not languages.

Post reply on HN