Hacker News new | ask | show | jobs
by jawher 5411 days ago
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.
2 comments

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.