#What goes where?
17-Feb-88 21:36:24
Sb: #109551-#What goes where?
Fm: Richard Rae/SYSOP 76703,4253
To: John Draper 76703,4322
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
"If you honestly disagree with… my contention that a language should
either check types all the time or not at all, then tell me the reason for
your disagreement."
Surely. IT DOESN'T MATTER. If you are letting a language do all your
casting for you, then the program is not self-documented at the lowest
level; you must look back to the variable declarations to figure out what
is being done where. Case in point: FORTRAN does casts automatically. That
doesn't stop XYBASE=REAL(COORD)*100.0 from being clearer than
XYBASE=COORD*100.0 if COORD is defined as INTEGER. I always cast
explicitly in FORTRAN too, just like C.
At the other end of the spectrum, if a language doesn't do ANY casting for
you, you MUST by definition cast everything.
What it comes down to is that, for my outlook and coding style, it doesn't
matter whether a language casts fully, partially, or not at all. A piece
of code written for understandability and maintainability has everything
spelled out.
Please note once more that I am not disagreeing with your contention that C
is not right FOR YOU. Further, I really can't argue on your grounds, since
I've not used Modula or Pascal. I am merely trying to keep you aware of
the fact that a lot of what you are labeling as inherent problems with the
language are based on your approach TO the language.