How to pronounce nullable types?


#1

How should we pronounce the nullable types when talking about code? I think what most use is the format “nullable Int”, but have also heard “int questionmark”. Both of these are quite long, so why not make a standard, shorter way of pronouncing these types. My suggestion is “Int-ish”

Maybe sounds a bit weird, but I think this is better than saying “nullable” or “questionmark” after each nullable type.

What you think?
Other suggestions?


#2

For me “nullable String” etc is good enough and is clearer than “String-ish”.


#3

What about “int-null”? This is like pronouncing int|null in languages with union types.
If it gets longer, read it as “or null”, e.g. ((Int?) -> Unit)? reads as “int null function or null”


#4

I’ve never encountered int|null, and must say “nullable {this-or-that}” is way more natural. And int? is just perfect expression for that. And to say int|null in C, which has unions since like dawn of time… “compiler error.”


#5

Why not “type or null”?