RE: Re[2]: [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 15:15:08
|
> -----Original Message-----
> From: Ioannis Vranos [mailto:iv...@at...]=20
> Sent: Saturday, April 12, 2003 6:10 PM
> To: 'Dev...@li...'
> Subject: RE: Re[2]: [Dev-C++] [q] Does C++ promote bad programming?
>=20
>=20
> > -----Original Message-----
> > From: dev...@li...=20
> > [mailto:dev...@li...] On=20
> Behalf Of Zodiaq
> > Sent: Saturday, April 12, 2003 5:36 PM
> > To: Dev...@li...
> > Subject: Re[2]: [Dev-C++] [q] Does C++ promote bad programming?
> >=20
> >=20
> > Hello Ioannis and all Dev-C++ users,
> >=20
> > Saturday, April 12, 2003, 4:07:54 PM, Ioannis wrote as follows:
> >=20
> > IV> So for example if you want to teach all the concepts of=20
> > Object Oriented
> > IV> programming, C++ is a perfect candidate.
> >=20
> > IMHO for such course better is Java - it has all benefits of OOP but
> > whithout pointers and with garbage collector and tables boundary
> > checking - which (for beginners) is very important... IMHO learning
> > C++ (as a faster language) should be done AFTER Java course...
>=20
>=20
> Java uses pointers although it is somewhat transparent to the user.
To bee more accurate, Java uses *only* pointers to objects on the free =
store
(without any special syntax). C++ can use both objects in the stack and =
in
the free store.
=20
> You are not forced to use pointers in C++. You use them if=20
> you want them.
Example:
#include <string>
#include <iostream>
int main()
{
using namespace std;
string something=3D"Coca Cola";
something+=3D" Pepsi Cola";
something=3Dsomething+" Sprite\n";
=20
cout<<something;
}=20
This is more convenient than Java where you have to call the operator =
new to
create the string, if I remember well (I do not like java so I do not
remember much of it).
Ioannis Vranos
=20
* 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
|