RE: [Dev-C++] [q] Does C++ promote bad programming?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@at...> - 2003-04-12 14:08:03
|
> -----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).
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
|