News for hackers. Stuff that matters.
Re:Ruby 3.2’s YJIT is Production-Ready by fxn on Tuesday January 17, 2023 @05:15PM (#34420210)
This is not true.

In Ruby, tests are the same you'd write in any other language. You test that things do what they are supposed to do, not the types of parameters or return values.

Re:Ruby 3.2’s YJIT is Production-Ready by bobbylarrybobby on Tuesday January 17, 2023 @06:46PM (#34421184)
Ok but if you can't constraint the types passed to a function then the universe of objects you have to test is massive. For instance you may have a performance benchmark that checks that a certain operation runs in a certain big O -- say, you want to make sure a contains(collection, elem) functions runs in constant time. If you can't constrain the type of collection (to be some kind of Map, say) then you are left testing that all paths that call contain do so with a Map and not, say, a List. In a typed language the type system would ensure that for you.
Re:Ruby 3.2’s YJIT is Production-Ready by sdf4j on Wednesday January 18, 2023 @12:05AM (#34423607)
That example is not very grounded on reality, isn't it?
Re:Ruby 3.2’s YJIT is Production-Ready by semiquaver on Wednesday January 18, 2023 @01:24AM (#34423967)
Try sorbet in a real project before you make this claim. It’s not perfect but it’s pretty good.