logoalt Hacker News

shevy-javatoday at 2:55 AM3 repliesview on HN

    def greet(name: String): String
      "Hello, #{name}!"
    end
Yep - looks like utter s...

I understand that many programmers come from languages where their brain has been adjusted to necessitate and depend on types. And they get help from the compiler in capturing some errors. But it is the wrong way to think about programs and logic. I'd wish these guys would stop trying to ruin existing languages. Go add types somewhere else please.

Note: I also use java, so I am not against types per se. I am against a want-on need to slap down types onto everything and your Grandma, merely because your brain (of type afficionados) needs them for survival.


Replies

sroericktoday at 7:35 AM

I'm sad you're getting downvoted. This is objectively uglier Ruby code. Ruby is a gorgeous language, and aesthetics is seemingly not allowed in the conversation.

I'm not convinced that the time savings of types exist at all, but even if it took twice as long to do anything with types, there is a completely valid argument that "it's worth it to look at nicer code".

show 2 replies
nurettintoday at 7:42 AM

This could be interesting, but do you have arguments other than "stop ruining muh languages" or "u r dumb"?