by nmz · 2y ago · 0 comments
I think having a special datatype differing between nil and null would still render the code the same, instead of using if var==nil, you're just now doing if var==null, if you're using a variable after you know a function was used and its nil you know it returned null. you can always just use { or false } if you really need to differ between nil (and waste space), that or use assert()
Also my problem with pattern matching returning nil is it breaks usage of concatenative :, as in match:""match"":match""
So if you use concatenative objects with :, make sure you never return any other type but the object itself. its what allows lpeg operator overloading to not error out in the middle of it.
No comments yet.