Just Wondering

Rob Carriere rob at raksha.eng.ohio-state.edu
Tue Apr 25 11:47:13 AEST 1989


In article <12565 at lanl.gov> jlg at lanl.gov (Jim Giles) writes:
>I don't suppose you also recommend limiting
>identifiers to one character?!?

Limiting, never.  Allowing, certainly.

 exp( j*2*rhat(i)*wc ) .* ( jw.^that(i) )   % this is not C, but it gets the
                                            % point across.

 exp( Square_root_of_minus_one*2*Estimated_relative_range(scatterer_index) ..
     *vector_of_measurement_frequencies_divided_by_lightspeed )            ..
* ( vector_of_measurement_frequencies_multiplied_by_the_square_root_of_minus_one ..
   .^ estimated_scatterer_type( scatterer_index ) )

There *is* a reason most mathematicians prefer algebra over English
desciptions.

>  Programming is a fundamentally different
>process from writing math texts.  There is no a_priori reason for one
>to resemble the other.

Quite.  But if I'm programming from a math text, I'd rather be allowed
to stick as closely as possible to that text's notation.  I already
find rhat for r-with-^ annoying; I'll positively start screaming if I
have to rename half my variables to conform to someone's empty idea of
a namespace.

>> 1.   Keep languages case-sensitive.
> -- better yet, make case sensitivity optional.

That, I'd happily go along with.

>Better yet, make declaration of identifiers which differ only in case
>strictly illegal.  Well, I guess it HAS to be just a warning for C
>to be backward compatible.  Still -- a NEW language could avoid these
>mistakes.

But, it is not a mistake.  At least not to quite a number of people.

>One last point.  I have a color computer a home.  To me, having a
>case sensitive language is as bad as having a _color_ sensitive one.
>Can you imagine?!?  Consider a program with 512 different variables,
>all spelled "a".  How would _YOU_ like to try to debug such a monster?

I wouldn't like to have 512 variables of any ilk in consideration
scope in any way, regardless of naming schemes.  Me got only small
skull, me KISSes all my programs (when they let me :-).  I *have*
debugged mathematical arguments where there were variables r, R, rho
and GAMMA (looks like a rho), all blissfully different.  I was happy
with it.  There was a system to the choice of alphabets, and same
letter in different alphabets meant related quantities; it was all
very intuitive.

SR



More information about the Comp.lang.c mailing list