4 ms·
> but if the price to pay is to start declaring types like I did in C and Java, no thanks Modern type systems have such good inference that you won't need to d
by 15155 12y ago
> but if the price to pay is to start declaring types like I did in C and Java, no thanks
Modern type systems have such good inference that you won't need to declare types "everwhere."
- pmontra 12y agoI know, but I think it's difficult to make static type inference when you can build both the class and the method dynamically. Examples: object.send(expression) or Class.send(expression) are hard enough, building the value of Class at runtime adds extra complication, adding that method only to that object is further along the way of complication. And I'm probably only scratching the surface. So, either Ruby 3 is so different from Ruby 2 in a way that Python 3 hasn't been from Python 2 or its static typing will be limited to some scenarios. If you do too much metaprogramming you give up using it. Something like using a subset of a language to get some bonus features (example: JS and ASM.js
- spion 12y agoIf its a gradual type system, you can choose whether to use it or not in a specific situation. Because of that it simply becomes just another tool in your toolbox, unlike in languages such as Java where its more of a anchor and chain