3 ms·
> Dynamic languages continue to be exceedingly popular. The preference for static typing is I think over-represented in online discourse. The most popular dyna
by Zababa 5y ago
> Dynamic languages continue to be exceedingly popular. The preference for static typing is I think over-represented in online discourse.
The most popular dynamic languages are all adding static typing though. Typescript became extremely popular very quickly, Python has been adding types annotations for a long time now, Ruby is adding them too, some team at Facebook is working on the same for Erlang. I've seen a few times Clojure users saying they don't need them, and considering Clojure has immutability, a strong REP and spec, I can understand that they don't feel the need. But Python, JavaScript, Ruby and even some Erlang/Elixir users think the opposite.
> I would be very surprised if the amount of Clojure/Clojurescript out there in production isn't several times larger than the amount of F#.
I think the same, but the thing is that I think the amount of Java for web apps is already several times larger than the amount of C# for web apps, which can skew things.
- kaliszad 5y agoAnnotations/ hints you can use optionally to convey extra metadata are a very different thing compared to types you have to use else nothing will really work. There were some optional type systems for Clojure but I cannot say how successful they are or were. I think the critical parts, e.g. APIs or code boundaries are specced out and that seems to be the recommended solution. Btw. just that people are adding something doesn't mean that it is good or helping in general. It is great, Python has the optional type annotations precisely because they are optional - you can use them when you think you are better off doing the extra work.
- Zababa 5y ago> Annotations/ hints you can use optionally to convey extra metadata are a very different thing compared to types you have to use else nothing will really work. I don't really agree. In Python for example, it's about making the implicit explicit. It's to make sure you don't use a function that only works on floats with ints. If you don't, you'll have a runtime exception, and it can be good idea to catch these errors at type checking time. You're already using types in dynamic languages, but they are implicit. Static typing makes the implicit explicit, and helps avoiding errors. If your type system is limited, it can make some things annoying that are easier in a dynamic language, I don't deny it. > There were some optional type systems for Clojure but I cannot say how successful they are or were. I think the critical parts, e.g. APIs or code boundaries are specced out and that seems to be the recommended solution. As I said before, I can understand that it's less necessary in Clojure than in Python or Ruby, because of things like immutability. > Btw. just that people are adding something doesn't mean that it is good or helping in general. It means precisely that though, if they're adding it it's because it brings value. Sure, your 50 line script probably doesn't need them, but your 10k app could benefit from them.
- Supermancho 5y agoPHP has all kinds of annotations and conventions for enforcing type safety now.
- Zababa 5y agoThat's true, I completely forgot about PHP. One thing I like about it is that it's included in the language and you don't need an external too like mypy to validate the types.