←back to thread

511 points mootrichard | 1 comments | | HN request time: 0.215s | source
Show context
burke ◴[] No.23990909[source]
I absolutely hate this.

Separate files for types with no inline annotations possible? What an embarrassing compromise. This is all because Matz explicitly won't allow type signatures in .rb files. I wonder how long it'll be until a hostile fork if he doesn't change his mind.

replies(2): >>23990927 #>>23991103 #
amw-zero ◴[] No.23990927[source]
I wouldn’t call it “embarrassing.” What is the actual benefit of having inline type annotations? What is the actual downside of having them in a separate file?
replies(3): >>23990975 #>>23990987 #>>23991500 #
HideousKojima ◴[] No.23990987[source]
The benefit is being able to see what type a variable is without having to open a separate file. Having an option to also have them in a separate file (ala TypeScript) is perfectly fine
replies(1): >>24010612 #
1. yawaramin ◴[] No.24010612[source]
Type info on hover in your editor gives you that.