Skip to main content
15 events
when toggle format what by license comment
Nov 21, 2012 at 7:02 history tweeted twitter.com/#!/StackProgrammer/status/271146703925673984
Nov 20, 2012 at 20:53 vote accept Hex Bob-omb
Nov 20, 2012 at 20:20 answer added Andres F. timeline score: 15
Nov 20, 2012 at 20:12 comment added Giorgio I agree with sepp2k. Just to add a few ideas: Languages that support option types also support exceptions to signal real errors. Nothing indicates the successful computation of a result. Example: if you look up a customer in a database you return Nothing if you do not find the customer, you throw an exception if there is not database connection.
Nov 20, 2012 at 20:10 comment added Giorgio @sepp2k: Excuse me, I have misread your comment (would instead of wouldn't). I will correct my comment.
Nov 20, 2012 at 19:59 comment added sepp2k @Giorgio How does any of what you just said contradict what I said?
Nov 20, 2012 at 19:45 comment added sepp2k I wouldn't really say that Nothing is a silent fail. Unlike null in other languages, functions that may return Nothing will say so in their type and the type system will force you to handle the possibility of Nothing in some way.
Nov 20, 2012 at 19:34 vote accept Hex Bob-omb
Nov 20, 2012 at 20:53
Nov 20, 2012 at 19:32 comment added user7043 @HexBob-omb programmers.stackexchange.com/search?q=maybe and stackoverflow.com/questions/tagged/maybe for starters. There are probably other searches that yield even more.
Nov 20, 2012 at 19:31 answer added Telastyn timeline score: 13
Nov 20, 2012 at 19:30 comment added Giorgio @Hex Bob-omb: You throw an error when you encounter one. Nothing indicates one possible result of a partial function. Nothing does not indicate an error but the correct result of a computation.
Nov 20, 2012 at 19:29 comment added Hex Bob-omb I don't know if it is. I didn't couldn't find any threads that answered my question.
Nov 20, 2012 at 19:28 review First posts
Nov 20, 2012 at 19:35
Nov 20, 2012 at 19:22 comment added user7043 There are a number of questions (both here and on SO) concerning the advantages of option types. How does your question differ from all of them?
Nov 20, 2012 at 19:11 history asked Hex Bob-omb CC BY-SA 3.0