Hacker Newsnew | past | comments | ask | show | jobs | submit | jfausdfwsdfa's commentslogin

> let notAValue: string | null = null

When did F# get unions?



At least they chose a syntax that makes it possible to generalize, which is a smart choice imho :)


Yeah it looks a lot like Python's PEP 604[0].

[0] https://peps.python.org/pep-0604


It had it since the first version as far as I know.


You're probably referring to Disciminated unions aka sumtypes? That's not what the parent meant


I thought those are the same and I realize that there is a difference.


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

Search: