potion icon indicating copy to clipboard operation
potion copied to clipboard

call on nil methods silently fail

Open kokizzu opened this issue 10 years ago • 3 comments

For example:

  123 println

will show nothing, that's unexpected..

kokizzu avatar Mar 17 '15 06:03 kokizzu

Agreed. In historic context this was one of why's early decisions, to just return nil on missing methods. I believe he wanted to allow catchable exceptions on those, but didn't have those implemented yet.

I'll see what I can do. Both issues need to be fixed. segv on nil calls and silence on missing methods.

rurban avatar Mar 17 '15 10:03 rurban

Hmm, maybe add a strict mode to throw an error on call on nil.

rurban avatar Oct 17 '15 08:10 rurban

We could just pretend everything is wrapped in an implicit Maybe monad?

robotii avatar Nov 06 '15 16:11 robotii