RE: [Dev-C++] [q] Does C++ promote bad programming?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Khalid El-K. <kha...@ho...> - 2003-04-12 21:12:31
|
read about multiple inheritance below.
> > -----Original Message-----
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf Of nada
> > Sent: Saturday, April 12, 2003 4:20 PM
> > To: dev...@li...
> > Subject: [Dev-C++] [q] Does C++ promote bad programming?
> >
> >
> > I'm interested in the opinions of the group.
> >
> > Is there anything in the C++ language which you feel inherently can
> > contribute to new programmers developing bad programming
> > habits? Is C++ an
>
>
>A programming language can't protect you from bad programming(!). For
>example one may have the bad habbit to do:
>
>
>
>template<class T>
>T add(T a, T b)
>{
> T c1=a, T c2=b;
>
> while(c1/a<2 && c2/b<2)
> c1++, c2++;
>
> return a+b;
>}
>
>
>int main()
>{
> int x=1, y=2;
>
> int z=add(x,y);
>}
>
>
>
>
> > inappropriate language for an introductory course, a course that is
> > designed to introduce learners to programming concepts, not
> > necessarily
> > prepare them for a programming career?
>
>
>In the contrary. C++ supports 4 paradigms and each one *well* and with
>optimal space/time efficiency. For example, in the OO paradigm it supports
>multiple inheritance. Few other languages do that (personally I do not know
>any other but I assume there is).
Python ... http://www.python.org
>
>
>So for example if you want to teach all the concepts of Object Oriented
>programming, C++ is a perfect candidate.
>
>
>
>
>
>Ioannis Vranos
>
>* Programming pages: http://www.noicys.freeurl.com
>* Alternative URL 1: http://run.to/noicys
>* Alternative URL 2: http://www.noicys.cjb.net
>
>
>Anti-racism movement: http://www.positive-youthfoundation.org
>Iraq Peace Pledge: http://www.peacepledge.org
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
>for complex code. Debugging C/C++ programs can leave you feeling lost and
>disoriented. TotalView can help you find your way. Available on major UNIX
>and Linux platforms. Try it free. www.etnus.com
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
|