5 ms·
These are all great but when are we getting optional typing? If the js ecosystem wasn't a clown operation my language of choice would be typescript instead of r
by dkarapetyan 10y ago
These are all great but when are we getting optional typing? If the js ecosystem wasn't a clown operation my language of choice would be typescript instead of ruby.
- nazgob 10y agoIt's not on agenda and it will never happen. There are so many languages with fine typing, why break a dynamic one by adding stuff to it?
- endgame 10y agoI think the person you are replying to will disagree that it is "breaking" the language.
- sundarurfriend 10y ago> It's not on agenda and it will never happen. I believe Matz has said that it is on the agenda for Ruby 3.0: that it will have static typing and that it will be optional.
- nazgob 10y agoTIL, I guess that making Ruby 3.0 3x faster (3x3 initiative) and adding optional static typing at the same time might be quite hard.
- pmarreck 10y agoIf you like types, why would you use TypeScript over Elm? http://elm-lang.org/ http://elm-lang.org/
- dkarapetyan 10y agoBecause I like optional types. I don't like the type system dictating the entire design.
- pmarreck 10y agoI like optional types as well, but more because I'm lazy. The Elm and Haskell people are not complaining about types, and given that every function takes SOMEthing (of some implicit type) and usually spits out SOMEthing (of some implicit type), I can hardly see how it will "dictate the design" more than create a bit more validation code.
- dkarapetyan 10y agoNot having this flame war. I have my reasons, you have yours. We will continue writing code using our separate ways. Certain patterns are awkward or even impossible in statically typed languages and you need to bypass the type system to get things done so implicit or not, static type systems have a cost. There is a benefit as well but the kinds of systems I work on I don't need the extra validation. I need the ability to quickly prototype and ship and then layer on the validation, hence the need for optional types.
- pmarreck 10y agoDidn't think I was starting a flame war, I thought we were having a stimulating discussion, actually, but the two are often confused online unfortunately. I don't use any statically typed languages myself, so there is no reason for me to advocate for them from a personal bias standpoint, I was just saying that the people who DO use them seem to be pretty sold on them. Your criticisms are valid of course!