Swift has Optionals. C# has Nullable types.
As far as I can tell both serve same purpose, besides value of some type they store information whether variable has value or is undefined (uninitialized).
Question is are Optionals just Nullable types with different name or are there other conceptual differences?
In another words, talking about concept itself, or in context of languages that do not have Optionals or Nullables, does it matter whict term is used?
When implementing that functionality in language does it matter whether I name type Optionals<T> or Nullable<T>
Aucun commentaire:
Enregistrer un commentaire