←back to thread

511 points mootrichard | 9 comments | | HN request time: 0.744s | source | bottom
1. lovetocode ◴[] No.23991935[source]
As an avid Rubyist I have no interest in introducing types into a dynamic language. I would just rather use C# or Java. I never understood why people are trying to make a round peg fit in a square hole.
replies(7): >>23991953 #>>23991970 #>>23992003 #>>23992076 #>>23992082 #>>23992275 #>>23993670 #
2. klysm ◴[] No.23991953[source]
Massive code bases that are difficult to maintain and refactor. It’s a cheaper effort to add types to that code.
3. ◴[] No.23991970[source]
4. matthewmacleod ◴[] No.23992003[source]
Ruby has types already, everywhere. An optional system that annotates these types and expresses relationships between them—allowing you to specify constraints and detect errors that you would otherwise not notice—is a win-win.
5. steve_adams_86 ◴[] No.23992076[source]
I think of it a little differently. I'm excited. I love these incremental type systems. I don't want to write C# all the time at all, but I do find myself missing it occasionally. These systems are excellent for easing that pain when a language like C# isn't an option.

When a statically typed, compiled language is an option I tend to choose Rust lately just for novelty and curiosity, but it's rare that I have those options. When I don't, I find these tools are a godsend. You don't really lose flexibility at all.

6. symlinkk ◴[] No.23992082[source]
It’s insane to me that people are still arguing against static types. TypeScript has proven that you can add the safety of static types without taking away any of the flexibility of dynamic typing. Every time you dive deep into source code to figure out what a field is called or what a function expects, remember that you could have eliminated that completely with static types.
replies(1): >>23993567 #
7. RangerScience ◴[] No.23992275[source]
FYI: Try Scala. IMO it feels a lot like working in Ruby.
8. mekster ◴[] No.23993567[source]
Perhaps if people have not used JS and TS, they would think that typings are in their brain memory but typings are a lot more than scalar and return value typings like defining a structure of a hash and apply that dynamically depending on parameter value or give string an enum like behavior limiting what could be assigned.
9. simplify ◴[] No.23993670[source]
As another avid Rubyist, I have great interest in my editor autocompleting code in Rails.