by crummy · 3y ago · 0 comments
Glad to see that some people are doing a more serious job than me :)
(also, it's a small world – I know Giuseppe Castagna, wasn't aware that he was working on typing Elixir)
I will say that editor support for static languages is categorically better due to the language server being able to more completely reason about the state of your code. That’s the one drawback.
You omitted the caveat: the program will behave in unexpected ways sometimes. What else do you do to ensure correctness?
ie The minimum bar for modern software is not "it compiles, ship it".
For example doing "1" + 2 would give you an error.
https://thinkingelixir.com/elixir-in-the-type-system-quadran....
I think the fact that most functions are "pure" / "static" is really helping with refactorings.
This topic has come up quite a few times on HN, but it seems like it’s generally people who haven’t ever used Clojure or another similar immutable functional language that worry about this.
IMO, Elixir and Clojure hit the sweet spot between a language like Ruby and one with an ML-inspired type system.
Elixir has great support for pattern matching, guards, documentation, testing and being a functional language all help negate the problems of a dynamic language.
Really they are a perfectly regular form of type hinting--as is pattern matching in function heads--when being used for no other purpose than to ensure the correct type is passed at runtime.
I know from Elm that it does change how things feel. I could see an upside. But coming from a dynamic life I can't quite grok considering it a requirement.
It really depends on your definition of your massive. Discord seems to have a few hundreds to a thousand employees in total. I am from a typical tech company. So I could estimate that their total engineers count is probably just a couple of hundreds, which is about our director/senior director's team size.
In our definition of massive, we could have even hundreds of ppl to touch the same portion of the code base frequently. We regularly have to deal with code which are about 10 years old and it's a moving target. You have to deliver quickly with migration requirement in mind. Also we frequently collaborate with the other teams and you have to be able to understand others' code quickly.
Typing is critical as you don't have time to deal with the constant stream of the new projects to dig deeper in to the objects. And you really want to have some understanding of the code in the first glance. We also want to offload lots of the things to compiler and ide as much as possible.
It doesn't have to be full on static typing like Java, type annotation in python/ruby already helped a lot
massive as in the top 10% of tech companies in the entire globe
> Discord seems to have a few hundreds to a thousand employees in total
quote: WhatsApp scaled to 1B users with only 50 engineers [1]
YMMV very large project have been written in Erlang/Elixir without static typing and they've been wildly successfull
i.e WhatsApp (based on Ejabberd), Ericsson network switches, RabbitMQ, CouchDB and a lot more, you can read about some of them here https://www.erlang-solutions.com/blog/which-companies-are-us...
as a less knows example, an entire insurance company in my country with > 1 million customers