It makes sense for the compiler to complain since for the same type, there is no need for an assignment overload which could actually cause problems.
For example I want to track all assignments for a particular type and log call stack.
Or I want to check ranges or other conditions. Or ... whatever.
I think disabling assignment overload for same type is artificial. If needed it should be turned on with a pragma or a compiler key.
real is a bit too c'sh
Actually it is a very strong argument, because a Pascal real is a distinct Pascal 48 bit type and differs greatly from C. That was the point.real is a bit too c'sh
Don't please. I agree that "single" and "double" are better, but criticising "real" (or any other language or documentation feature) simply because it is "too C-ish" is a very weak argument.
MarkMLl
Actually it is a very strong argument, because a Pascal real is a distinct Pascal 48 bit type and differs greatly from C. That was the point.real is a bit too c'shDon't please. I agree that "single" and "double" are better, but criticising "real" (or any other language or documentation feature) simply because it is "too C-ish" is a very weak argument.
I'll agree that 48-bit floating point is pretty unlike anything else, let alone C. But at that point I can't see any reason to introduce C into the discussion: by all means say "Pascal reals don't comply with IEEE-754" but don't make it look as though everybody in the community is out to pick a "my language is better than yours" fight.
Agreed. Real is anything, but C-ish, cause C does not have such a type.C does not even have strings, but these C people call everything that smells like a floating point: real. (lest you forgot!)
Perhaps we should rename "real" to be "trump"I don't think we should do that, "real' isn't that bad.
Real is a set/type of numbers, the R set. https://en.wikipedia.org/wiki/List_of_types_of_numbersAgreed. Real is anything, but C-ish, cause C does not have such a type.C does not even have strings, but these C people call everything that smells like a floating point: real. (lest you forgot!)
Only Pascal has a real real type.... ;D >:( with a silly bit count... >:D
Real numbers ({\displaystyle \mathbb {R} }\mathbb {R} ): Numbers that can represent a distance along a line. They can be positive, negative, or zero. All rational numbers are real, but the converse is not true.
Only Pascal has a real real type.... ;D >:( with a silly bit count... >:D