←back to thread

511 points mootrichard | 5 comments | | HN request time: 1.213s | source
Show context
muglug ◴[] No.23990520[source]
Can someone explain why the types cannot live in Ruby code itself (after an appropriate version bump)?

Python 3 incorporated types into the language itself, in a similar way (though non-reified) to PHP. This seems much easier to deal with than requiring two files (.rb and .rbs) to describe a single data structure.

replies(4): >>23990918 #>>23990947 #>>23991201 #>>23991455 #
regularfry ◴[] No.23990947[source]
I can well imagine that it might be because ruby's formal syntax is already utterly bonkers, and the thought of adding types to it in any usable fashion gave someone a seizure.
replies(1): >>23991741 #
rudolph9 ◴[] No.23991741[source]
Haven't used ruby in years for the typical reasons people move away from it (performance, strong types, GVL, etc.) but syntax is #1 reason I like programming in Ruby. I did mostly ruby for about 5 years and really grew to love it! It may seem bonkers at first but quite enjoyable once you understand it. Now nearly 4 years later of mostly javascript, golang, python, haskell I still regularly stop and think to my self how much I miss ruby!
replies(3): >>23991854 #>>23991856 #>>23991913 #
1. chillfox ◴[] No.23991913[source]
Crystal [1] is a pretty nice ruby like language with types and it is up there with Go/Rust for runtime performance.

[1] https://crystal-lang.org/

replies(1): >>23995582 #
2. nurettin ◴[] No.23995582[source]
Crystal is nice since they added a decent concurrency model, but it doesn't support one of the major platforms (windows)
replies(2): >>23995657 #>>23999513 #
3. pjmlp ◴[] No.23995657[source]
Same applies to Swift (even worse than Linux) and Go (e.g. plugins package).

So while I agree with you, I still look forward to see support for Windows eventually landing.

4. Can_Not ◴[] No.23999513[source]
Didn't ruby historically have poor support for windows? Everything great has to start small either eay.
replies(1): >>24018370 #
5. nurettin ◴[] No.24018370{3}[source]
Yeah no, you can say this against literally every criticism and be right unless someone comes up with time spans and user experiences of other great things to disprove it. Ruby was great on windows since 1.8, don't know how it was before that. I recently scripted AIX with it, so not really a contender on the same lane.