News for hackers. Stuff that matters.
Re:Algebraic Data Types by bjeanes on Thursday July 31, 2014 @01:29PM (#8115572)
I'd never thought about this before in the context of Java. IIRC, Java can not have type-parameterized enums (i.e. generic enums), so a Maybe<T> isn't possible. I hope I'm wrong — it's been a while since I did much Java.
Re:Algebraic Data Types by dllthomas on Thursday July 31, 2014 @01:51PM (#8115758)
Well, you certainly can by expanding the parameterization manually like I did above. I think you're otherwise correct, though - I don't think Java will presently do it for you.