A discussion earlier today led me to question whether or not my understanding of primtives and literals is correct.
My understanding is that a literal type is spec
Is my understanding (if not my explanation) correct for the most part?
I do not agree in one point:
A literal is some kind of compile time constant (as "Hello World"
, 5
or 'A'
). However, there are no "Literal-Types"; the literal always is the actual value.
Primitive types are IMO "basic" types like string, int, double, float, short, ...
So primitive have their types of literals connected with them.