News for hackers. Stuff that matters.
Re:Use Your Type System by 0x457 on Thursday July 24, 2025 @04:26PM (#44675647)
It's strongly typed, but it's also duck typed. Also, in ruby everything is an object, even the class itself, so type checking there is weird.

Sure it stops you from running into "'1' + 2" issues, but won't stop you from yeeting VeryRawUnvalidatedResponseThatMightNotBeAuthorized to a function that takes TotalValidatedRequestCanUseDownstream. You won't even notice an issue until:

- you manually validate

- you call a method that is unavailable on the wrong object.

Re:Use Your Type System by arrowsmith on Friday July 25, 2025 @01:14PM (#44685577)
You just described why I fell out of love with Ruby.
Re:Use Your Type System by 0x457 on Monday July 28, 2025 @02:53PM (#44714025)
Because you wanted to do 1 + '1'?