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

Again, nullable types are not "baked into" the language. They are syntax sugar for a union type.

Also, Ceylon doesn't need Either, since that is just a workaround for not having union types.

Seriously, union and intersection types are _really_ fundamental notions in set/type theory, and having them as basic constructs of the language makes the language _much_ more expressive.

I seriously urge you to try it out. You'll love them, I guarantee it.



> Again, nullable types are not "baked into" the language. They are syntax sugar for a union type.

So I can have my own type standing in for the ? instead of Null?

  String? // Option[String]
  ...
  String? // Validation[String]


"String?" is equivalent to "String|Null". Only the question mark syntax sugar is baked in.




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

Search: