News for hackers. Stuff that matters.
Re:Servo Nightly Builds Available by Morgawr on Friday July 01, 2016 @05:55AM (#12014853)
I do things like this all the time in Haskell when quickly prototyping new code and then swiftly kick myself because of it. Safe languages are nice, but there's really no way to prevent a developer from saying "Yeah fuck it, this case will never happen anyway" and then calling a fromJust on a Maybe monad which turns out was a Nothing and throws a runtime exception.
Re:Servo Nightly Builds Available by majewsky on Monday July 04, 2016 @07:21AM (#12030071)
Well, there is a way: Don't allow partial functions like fromJust or head. But a) it's going to make prototyping so tedious that no one will bother using this hypothetical language, and b) there are problems that you just cannot solve without partial functions (e.g. foldl1).