MCENANEY WILLIAM J wrote:
> 
> Hi Glynn,
> 
> Maybe this time I'll say what I mean.  My general point is that if I could
> redesign C, I would replace functions such as strcmp() with the correspond-
> ing relational operators.  To find out whether two strings were equal to
> each other, I would use a relational equal sign.  The statement,
> "if (strcmp (s1, s2) == 0)" would become "if (s1 = s2)".  That change
> would overload the relational equal sign.
> 
> But what about the equal sign for assigning a value to a variable?  Well,
> I would replace that with a left arrow.  Then nodody would think that
> the assignment operator was a relational equal sign.
> 
> Was "abstraction" the wrong word to use?  I want my programs to protect
> their readers from minute details.  If somebody wants to use a stack,
> I want that person to be able to think about pushing, popping, clearing,
> and so forth, without worrying about how the pushing, popping, and
> clearing go on in the black boxes.
> 
> You make an important point.  Maybe I ought to use a language better for
> programming of the sort I want to do.  C is a language for systems
> programming.  Eiffel is not.  If I want to hide details, I better use a
> language designed to help me do that.  I shouldn't try to change C into
> another language.
> 
> Warm wishes,
> Bill

Redesign C.

Somebody has already done that for you.

It's called C++, and what you want to do is "operator overloading". You
probably heard about it somewhere already. If you are interested, check
it out. With nice objects and all.

-- 
Maarten van Leunen

Student - Fontys Institute of Technology Eindhoven
e-mail: [EMAIL PROTECTED]
http://www.il.fontys.nl/~maartenl
http://lok.il.fontys.nl/

Reply via email to