3 ms·
I think that I don't like your function syntax, but meh, that's kind of irrelevant. So you're basically just using exceptions as syntatic sugar for return code
by TheLoneWolfling 11y ago
I think that I don't like your function syntax, but meh, that's kind of irrelevant.
So you're basically just using exceptions as syntatic sugar for return codes. Works reasonably well, I suppose.
- mamcx 11y agoThe syntax is no the final. I'm go after a python/julia/elixir like syntax.
- TheLoneWolfling 11y agoWell, it's not there yet. That being said, I don't particularly like the overloading of `!=` there. I like the idea of a shortcut meaning "call this function and get the error value", but I wouldn't use `!=` for it. Perhaps take a page from Lua's book and use `_` as a throwaway variable. So `a = foo()`, or `a,b = foo()`, or `_,b = foo()`.
- mamcx 11y agoOh, great suggestion... and so obvious...