Invalid analogy

John F Nixon jnixon at andrew.ATL.GE.COM
Tue Mar 6 05:51:33 AEST 1990


billwolf%hazel.cs.clemson.edu at hubcap.clemson.edu (William Thomas Wolfe, 2847 ) writes:

> [Both case and if] statements execute different sections of code
> depending on the value of a controlling expression.  ... the if or
> case constructs ... are so closely related that one is a special case
> of the other. This extreme similarity, unfortunately, does not extend
> to C's concept of how the two should be supported within the ... language.

I was wondering how Bill was going to defend Ada's inclusion of loop/exit :-).
Clearly, it is a violation of the notion of consistency; so now we are
reduced to merely consistency within "similar" constructs.  I would argue that
if consistency is indeed a good thing, it is worth being consistent throughout.

It would be possible to design a language that is so inconsistent one would 
have difficulty programming in it.  I claim neither C nor Ada fall in that
class.  I have written lots of C code, and I cannot *ever* remember leaving
out a break; it is simply not confusing to anyone who understands C.  I have
not written much Ada; I have been confused by Ada, because I do not understand
the language well.  I do not understand why one cannot declare an array within
a record -- one must declare an array type, then use the type within a record.
Yes, I know it is good practice to declare types, but if so why does Ada allow
array declarations (without type) at all?

{Ada,C} can be mastered, and is a useful tool.  {Ada,C} has problem areas, but
is not unacceptable as a programming tool.  The crucial factor is not the
choice of language, but the education of the human who uses the language.
The difference between the best and the average is so large that surely
there is more room for improvment in education than language design.

----
jnixon at atl.ge.com                    ...steinmetz!atl.decnet!jnxion



More information about the Comp.lang.c mailing list