Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Even Java has the Void type, meaning you can write:

    Function<Void>
It's a bit shady though as you still have to return a value from the body of the method, and that value has to be null.


That sort of this is also easy to do in C# or any strongly typed language. Similar things in c# are the DBNull type which "Represents a nonexistent value" from a database (http://msdn.microsoft.com/en-us/library/system.dbnull.aspx ) and Type.Missing which "Represents a missing value in the Type information"


> It's a bit shady though

'bit of an understatement there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: