If you said "often", or "all the time", I'm curious about what kinds of things you are seeing, and what it would take to catch them sooner in Ruby…

4
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Abdullah Esmail

@noelrap I work with numbers a lot. In my experience, most bugs come from not dealing with nil as a possible value.

Another “issue” is dealing with nil values where it can’t logically be nil.

3
1y
Brandon Weaver :ruby:

@noelrap rarely if ever. If anything I've seen Sorbet encourage some really bad patterns when used by novices, especially when T::Struct and interfaces proliferate everything.

0
1y
Tom Stuart

@noelrap I answered “all the time”, but I was thinking almost entirely of unhandled `nil`s, which a lot of static type systems also don’t prevent.

1
1y
Micah Gates

@noelrap every time you have an unexpected nil is a type error, right? That seems to be an extremly common class of errors, even if it was caused by a subtle logic bug.

1
1y
Replies