473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Microsoft C# a replacement for old C++ language

I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers. I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

Any comparisons out there?

Thanks
The Grand Master

Nov 21 '06 #1
28 1751
VJ
Master Programmer wrote:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers. I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

Any comparisons out there?
You call pointers garbage, but it depends what you put in them.

I am yet to see a microsoft product that does not crash. I crashed every
their shit I touched. They probably hire bunch of monkeys to program
their software

It all depends what are your preferences, and what you want to do. If
you hate pointers go for java, but I have to agree its slow. I didnt
try c# and probably will not see it for a while, but I see some people
are happy with it.
Tried searching for "c++ vs c#" ?
Nov 21 '06 #2
Master Programmer wrote:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world.
That is mostly hype. Yes, for some tasks C# can be a good tool if you really
don't need all the horsepower of C++.

Unless java, C# has the using statement to provide some degree object
lifecycle control, but it is still to primitive to rely on it for all
resource management.

When Java first appeared, the enthusiasm for GC was so high that all over
the place we read: "The need for the programmer, to do bookeeping are gone,
just allocate and forget, GC will take care". Many beginners did just that,
and saw their software locking, hanging, crashing or having unexpected
behaviors. Well, the memory is not the single critical resource one use
inside an object. You often open a file, a named semaphore or pipe, a
socket and so on. This are resources that you can not allow the GC to take
care of them at his own will, when he feel so.

So, the classical C++ paradigm:

x=new X(); ..... do work here .....; delete x;

has become in Java:

x=new X(); ..... do work here .....; x->Dispose();

The same amount of bookkeeping is required, and the task is a bit more
tedious. Because in C++ you know that every new must eventually "be closed"
by a delete. In java and C# you actually need to keep track of disposable
or non disposable objects.

And if you look and see that the intensive use of STL containers, smart
pointers and a carefull design can help you not to care (too much) about
deleting objects, the C++ seems like the paradigm winer here.

I often use to say: whenever complain about lack of GC in C++ don't really
understand programming to well. The creators of Java and C# being included
in this category too.
I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers.
I often use to say: whenever complain about lack of GC in C++ don't really
understand programming to well.
I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern.
I would name it "overhyped" but that is the whole point. Marketing sells.
I also thought about Java but its WAY too slow.
Is getting better all the times. Yes, it is a bit slow but definitely not
the horror story it was 10 years ago.

And also, now it is open source. This will guarantee that no company will
mess up with java agenda. C# specs can be changes by MS at all any time.
Also, they launch the new specs only when they are ready to get with a new
version on the market.

That creates an about 2 year gap betwen MS.NET and Mono project. Since most
programmers like to try the newest tools to take advantage of the new
stuff, this create a portability gap betwen the software running on Windows
and on Mono.

Most Windows programmers are also not very well educated about the
portability issues (or don't care about them) so their code is littered
with PInvoke and hardcoded path strings like "C:\\Windows\\...". This kind
of idiotic code will not run on other OS despite the existence of a
compatible .NET engine there. Java programmers on the other side are
"evangelised" about portability from cradle and java library is more
complete than .NET so you don't need to use (that often) OS specific calls.
As a result, the average java code it is way way way more portable than C#
code.

Because we don't live into a closed world, and because the technology evolve
rapidly, and because smart people don't like to be handcuffed by a
particular vendor, I strongly recommend Java over C# if you don't like C++.
I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.
A VB guy actually complaining about Java speed ?
Any comparisons out there?
Yes. C++ rules, Java suck but you should always prefer Java instead of C#.

Nov 21 '06 #3
Master Programmer:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to f*** around
sencelessly with low level garbage like pointers.

(We curse for a reason. If you blend them through your regular everyday
speech, you reduce their efficacy when actually feel a need to use them.
And it's unpleasant to the untrained ear.)

It really depends how dumb a programmer you want to be. You program in the
likes of Java and Visual Basic without having a bull's notion of how
computers actually work (e.g. CPU registers).

If you don't know how redirection works (i.e. pointers), then you're not a
programmer in my books.
I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

C# is just another half-baked atrocity from Microsoft. If were to give
programming advice to a beginner, I'd tell them to stay WELL AWAY from
Microsoft.

I use C++ for every programming purpose. If I can't find a C++ compiler for
my platform, then I program in C.

Other than that, I'd write the odd bit of assembly.

--

Frederick Gotham
Nov 21 '06 #4
Frederick Gotham wrote:
Master Programmer:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to f*** around
sencelessly with low level garbage like pointers.


(We curse for a reason. If you blend them through your regular everyday
speech, you reduce their efficacy when actually feel a need to use them.
And it's unpleasant to the untrained ear.)

It really depends how dumb a programmer you want to be. You program in the
likes of Java and Visual Basic without having a bull's notion of how
computers actually work (e.g. CPU registers).
I think that makes sense when you are working on a manageable size
system. Once you get into larger scale stuff you really don't want to
know about it I reckon. Optimisation can wait.

What Java and Visual Basic and C# are about is getting common tasks
done easily in their domain A lot of the stuff is helpful utilities
like source code documentation and reflection which make life much less
tedious... and comprehensive libraries

IMO C++ doesnt pay enough attention to the basics like this and because
it is so hard to learn in the first place that is more important than
for other languages. OTOH after becoming proficient in C++, my
experience of programming in VB or Java is that its a pretty sad
business. VB is incredibly verbose from waht I remember and AFAIK Java
basically does do "evrythings an object" but you cant work properly
with value types .

However for the VB Java and C# programmers out there I guess its a case
of if you never had it you won't miss it ! Maybe though there is the
odd one that thinks... hmm I wish I could do... and then maybe they
will see what C++ is about.

regards
Andy Little

Nov 21 '06 #5


On Nov 21, 5:09 pm, "kwikius" <a...@servocomm.freeserve.co.ukwrote:
Frederick Gotham wrote:
Master Programmer:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to f*** around
sencelessly with low level garbage like pointers.
(We curse for a reason. If you blend them through your regular everyday
speech, you reduce their efficacy when actually feel a need to use them.
And it's unpleasant to the untrained ear.)
It really depends how dumb a programmer you want to be. You program in the
likes of Java and Visual Basic without having a bull's notion of how
computers actually work (e.g. CPU registers).I think that makes sense when you are working on a manageable size
system. Once you get into larger scale stuff you really don't want to
know about it I reckon. Optimisation can wait.

What Java and Visual Basic and C# are about is getting common tasks
done easily in their domain A lot of the stuff is helpful utilities
like source code documentation and reflection which make life much less
tedious... and comprehensive libraries

IMO C++ doesnt pay enough attention to the basics like this and because
it is so hard to learn in the first place that is more important than
for other languages. OTOH after becoming proficient in C++, my
experience of programming in VB or Java is that its a pretty sad
business. VB is incredibly verbose from waht I remember and AFAIK Java
basically does do "evrythings an object" but you cant work properly
with value types .

However for the VB Java and C# programmers out there I guess its a case
of if you never had it you won't miss it ! Maybe though there is the
odd one that thinks... hmm I wish I could do... and then maybe they
will see what C++ is about.

regards
Andy Little- Hide quoted text -- Show quoted text -
I see you are perfectly executed here.So let me put it short :Power
needs responsiblity and C++ gives you the power.Choice is up to you .I
believe that C# is
better than VB _ after all it is immitating(steeling) C++`s syntax.BUT
replacing C++ with C# looks like a joke.things are easier with C# if
you wanna beg uncle BILLY all the time.but if you wanna live
independent...C++ still wins.

Nov 21 '06 #6

Master Programmer wrote:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world.
The only kernel of truth in that is that Microsoft has decided to
depricate win32 and so the only way to run truely native code will be
with the .NET framework. This means C++/CL or some other .net
language. There is still billions of lines of code in C++ on other
platforms though.
Thanks
The Grand Master
That's a pretty dubious title.

Nov 21 '06 #7
On 21 Nov 2006 01:32:09 -0800, "Master Programmer"
<ma***************@outgun.comwrote in comp.lang.c++:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to **** around
*plonk*

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 21 '06 #8
Jack Klein wrote:
On 21 Nov 2006 01:32:09 -0800, "Master Programmer"
<ma***************@outgun.comwrote in comp.lang.c++:
>I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to **** around

*plonk*
<HUMOR>
Hey, Jack, don't plonk the guy. He must know what he's talking about,
after all, he's a "Master Programmer".
</HUMOR>

(Humor tags added for the humor impaired, in compliance with the ADA).

Nov 21 '06 #9
DragonSt0rm wrote:
So, the classical C++ paradigm:

x=new X(); ..... do work here .....; delete x;
This is a C++ paradigm?
Looks more like a C one to me.

This is an example of the kind of things you must not do in C++.

Nov 21 '06 #10
Master Programmer wrote:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers.
If you're playing around with low-level things like pointers in C++
you're probably doing things wrong.

References are way better for anything when the data doesn't need to be
owned but only referenced.

When the data needs to be owned by an object, the way to free it must be
inside its destructor to follow RAII and ensure exception safety.
Therefore it must be wrapped.

Currently, the only good usage for raw (non-wrapped) pointers I can find
is indexes.

If the current proposal for GC in C++ goes in, using raw pointers
everywhere will become valid though.
Nov 21 '06 #11

Master Programmer wrote:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers. I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

Any comparisons out there?
This guy's a troll. He's posted similar messages to the Java and VB
newsgroups claiming the respective languages will be "phased out" or
some other nonsense. Master Programmer, indeed.

Nov 21 '06 #12

"Mathias Gaunard" <lo******@remove.gmail.comwrote in message
news:45***********************@news.free.fr...
DragonSt0rm wrote:
>So, the classical C++ paradigm:

x=new X(); ..... do work here .....; delete x;

This is a C++ paradigm?
Looks more like a C one to me.

This is an example of the kind of things you must not do in C++.
Eh? So C includes new and delete now? I'm pretty sure they're C++
constructs. (C uses malloc and free.)

Perhaps you're referring to a preference of avoiding pointers when possible?
Or the use of the RAII paradigm? In any case, that's pure C++ code as far
as I can tell.

-Howard


Nov 21 '06 #13

<jj*****@yahoo.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>
Master Programmer wrote:
>I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers. I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

Any comparisons out there?
This guy's a troll. He's posted similar messages to the Java and VB
newsgroups claiming the respective languages will be "phased out" or
some other nonsense. Master Programmer, indeed.
Master "Baiter", more like. :-)
Nov 21 '06 #14

"Mathias Gaunard" <lo******@remove.gmail.comwrote in message
news:45***********************@news.free.fr...
Master Programmer wrote:
>I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers.

If you're playing around with low-level things like pointers in C++ you're
probably doing things wrong.
Using pointers is not *wrong". They're in the language for a reason, and
they work quite well. There are safer ways to accomplish most things, but
that doesn't make using them wrong.
>
References are way better for anything when the data doesn't need to be
owned but only referenced.

When the data needs to be owned by an object, the way to free it must be
inside its destructor to follow RAII and ensure exception safety.
Therefore it must be wrapped.
"Must be wrapped"? Well, you could also simply include the object as a
simple member. Not everything has to be dynamically allocated, (whether
that's using smart pointers or raw pointers).
>
Currently, the only good usage for raw (non-wrapped) pointers I can find
is indexes.
If you've got the luxery of writing all the code you use yourself, and never
interfacing with any code that expects or returns pointers, more power to
you.

But I like my pointers, I need my pointers, and nobody's gonna deprive me
of 'em! :-)

-Howard

Nov 21 '06 #15
Howard wrote:
"Mathias Gaunard" <lo******@remove.gmail.comwrote in message
news:45***********************@news.free.fr...
>DragonSt0rm wrote:
>>So, the classical C++ paradigm:

x=new X(); ..... do work here .....; delete x;

This is a C++ paradigm?
Looks more like a C one to me.

This is an example of the kind of things you must not do in C++.

Eh? So C includes new and delete now? I'm pretty sure they're C++
constructs. (C uses malloc and free.)

Perhaps you're referring to a preference of avoiding pointers when
possible? Or the use of the RAII paradigm? In any case, that's
pure C++ code as far as I can tell.
But the paradigm is pure Java. :-)

The C++ idiom is

{
X x;
// do some work here
}
// x has gone out of scope, and is destroyed.
Bo Persson

Nov 21 '06 #16

"Bo Persson" <bo*@gmb.dkwrote in message
news:4s************@mid.individual.net...
Howard wrote:
>"Mathias Gaunard" <lo******@remove.gmail.comwrote in message
news:45***********************@news.free.fr...
>>DragonSt0rm wrote:

So, the classical C++ paradigm:

x=new X(); ..... do work here .....; delete x;

This is a C++ paradigm?
Looks more like a C one to me.

This is an example of the kind of things you must not do in C++.

Eh? So C includes new and delete now? I'm pretty sure they're C++
constructs. (C uses malloc and free.)

Perhaps you're referring to a preference of avoiding pointers when
possible? Or the use of the RAII paradigm? In any case, that's
pure C++ code as far as I can tell.

But the paradigm is pure Java. :-)

The C++ idiom is

{
X x;
// do some work here
}
// x has gone out of scope, and is destroyed.
Yep, I agree that's the "preferred" method in C++, but the statement that
new/delete is a C paradigm is what I was arguing against. It's not even
available in C, so it can't be a C paradigm.

-Howard
Nov 21 '06 #17
Howard wrote:
Eh? So C includes new and delete now? I'm pretty sure they're C++
constructs. (C uses malloc and free.)
Paradigms are general things.
I'm not talking about new and delete specifically.

Perhaps you're referring to a preference of avoiding pointers when possible?
Or the use of the RAII paradigm? In any case, that's pure C++ code as far
as I can tell.
I am refering to RAII, indeed.
All resources should be freed in destructors. This is the only good way
to make code exception-safe.

Nov 21 '06 #18
Howard wrote:
"Must be wrapped"? Well, you could also simply include the object as a
simple member.
I'm talking about pointers here. Pointers to dynamically allocated data
need to be wrapped.
Why are you even mentioning (automatic) objects?

Not everything has to be dynamically allocated
I personally don't do it much, but all those people fans of Object
Oriented Programming need it for polymorphism.

But I like my pointers, I need my pointers, and nobody's gonna deprive me
of 'em! :-)
Feel free to write bad, exception unsafe and leaky code.
That's not my problem.
>
Nov 21 '06 #19
Bo Persson wrote:
>Perhaps you're referring to a preference of avoiding pointers when
possible? Or the use of the RAII paradigm? In any case, that's
pure C++ code as far as I can tell.

But the paradigm is pure Java. :-)

The C++ idiom is

{
X x;
// do some work here
}

It is also the C++ paradigm when due to some other restriction you have to
allocate on heal instead of the stack.

Consider for example an embedded (or old DOS) system with a small stacksize,
where you have to allocate a RGBA image of 500x300 pixels. You can't do
that on stack. The "invention" of smartpointers (like auto_ptr) was fueled
exactly because of the fact that this paradigm was widely used.

Yes, strangely enough for Mathias, the new/delete operators preceded the
auto_ptr in the C++ (not C) language history :-)
The fact that is modern days, it is thought at the same moment, it is a
mater of evolution of language and of the teaching methods. But it wasn't
always that way. Borland 1.0 didn't knew about templates at all.

So, from the historical perspective I was talking about (when Java was
designed) what I presented there IT WAS the standard C++ paradigm.
Java tried to eliminate the "delete problem" by introducting the GC, yet
this generated a whole set of issues related to nonmemory resource
allocation/disposal. So, in the end the x.Dispose() become the second
nature of java programmers, as like delete x is for C++ programmers.
Nov 22 '06 #20
DragonSt0rm wrote:
It is also the C++ paradigm when due to some other restriction you have to
allocate on heal instead of the stack.

Consider for example an embedded (or old DOS) system with a small stacksize,
where you have to allocate a RGBA image of 500x300 pixels. You can't do
that on stack. The "invention" of smartpointers (like auto_ptr) was fueled
exactly because of the fact that this paradigm was widely used.

Yes, strangely enough for Mathias, the new/delete operators preceded the
auto_ptr in the C++ (not C) language history :-)
How are smart pointers related to what you're saying?

What you need here is an Image type, which indeed does dynamic
allocation. It is way closer to a container. (and the easiest
implementation is to directly use a std::vector as a member, which
replaces advantageously any usage of new[]).

Smart pointers where invented because of the polymorphism problem,
mainly, and eventually to move around non-copyable types too. That's
totally unrelated.

Anyway, what I was saying is that all resources must always be freed in
destructors. That is RAII, and you should follow it ; it is the main C++
idiom.
If for some obscure reason you don't want to follow it (which is your
right, and is actually safe to do if you're only playing around things
with nothrow guarantee) then don't mark it as a standard idiom or good
practice.

The fact that is modern days, it is thought at the same moment, it is a
mater of evolution of language and of the teaching methods. But it wasn't
always that way. Borland 1.0 didn't knew about templates at all.
Borland 1.0 didn't know about C++. It didn't even follow the ARM.
C++ was defined in 1998 and includes templates.

So, from the historical perspective I was talking about (when Java was
designed) what I presented there IT WAS the standard C++ paradigm.
That's just a C paradigm where you replaced malloc with new.
Just like old C++ was just C with classes.

Java tried to eliminate the "delete problem" by introducting the GC, yet
this generated a whole set of issues related to nonmemory resource
allocation/disposal.
GC isn't just about the "delete problem" as you call it.
Maybe you should consider learning about GC and what its applications
are before trying to criticize it.

Nov 22 '06 #21

Howard wrote:
"Bo Persson" <bo*@gmb.dkwrote in message
news:4s************@mid.individual.net...
Howard wrote:
"Mathias Gaunard" <lo******@remove.gmail.comwrote in message
news:45***********************@news.free.fr...
DragonSt0rm wrote:

So, the classical C++ paradigm:

x=new X(); ..... do work here .....; delete x;

This is a C++ paradigm?
Looks more like a C one to me.

This is an example of the kind of things you must not do in C++.
Eh? So C includes new and delete now? I'm pretty sure they're C++
constructs. (C uses malloc and free.)

Perhaps you're referring to a preference of avoiding pointers when
possible? Or the use of the RAII paradigm? In any case, that's
pure C++ code as far as I can tell.
But the paradigm is pure Java. :-)

The C++ idiom is

{
X x;
// do some work here
}
// x has gone out of scope, and is destroyed.

Yep, I agree that's the "preferred" method in C++, but the statement that
new/delete is a C paradigm is what I was arguing against. It's not even
available in C, so it can't be a C paradigm.

-Howard
this concept exists in C via malloc/free but the C++ terminology is
new/delete with the ability to initialise via ctor.

Nov 22 '06 #22
Mathias Gaunard wrote:
>The fact that is modern days, it is thought at the same moment, it is a
mater of evolution of language and of the teaching methods. But it wasn't
always that way. Borland 1.0 didn't knew about templates at all.
Borland 1.0 didn't know about C++. It didn't even follow the ARM.
C++ was defined in 1998 and includes templates.
The first Borland C compilers were called "Turbo C". If I remember well, the
only products called "Borland Csomething" were "Borland C++", years after
Turbo C 1.0, and after some packages called Turbo C++. Later they sell both
packages called "Turbo C++", and "Borland C++", differing in the number and
variety of tools included in each.

--
Salu2
Nov 22 '06 #23

Master Programmer wrote:
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers. I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

Any comparisons out there?

Thanks
The Grand Master
What the hell is a "Master Programmer" with "heaps of experience making
complex programs in Visual Basic" ?

Just trolling too :-)

Nov 22 '06 #24
>
>But I like my pointers, I need my pointers, and nobody's gonna deprive
me of 'em! :-)

Feel free to write bad, exception unsafe and leaky code.
That's not my problem.
>>
What makes you think I write bad, leaky code? If you're saying that all
code using new and delete is bad and leaky, then you're simply incorrect.
Granted, exception safety is more difficult to ensure with raw pointers, but
not impossible. A competent programmer should be able to use new and delete
correctly. Only an incompetent programmer writes bad, leaky code
(regardless of whether or not raw pointers are used).

-Howard

Nov 27 '06 #25

Howard wrote:
But I like my pointers, I need my pointers, and nobody's gonna deprive
me of 'em! :-)
Feel free to write bad, exception unsafe and leaky code.
That's not my problem.
>

What makes you think I write bad, leaky code? If you're saying that all
code using new and delete is bad and leaky, then you're simply incorrect.
Granted, exception safety is more difficult to ensure with raw pointers, but
not impossible.
Depends on the guarantee required. There may very well be cases when
using raw pointers makes the strong guarantee unfeasable or impossible
to provide. It can also be pretty difficult to provide even the basic
guarantee when using raw pointers. This is what RAII has been invented
to answer. More often than not people that use raw pointers aren't
even aware of the miriad of possible leaks in their code.

Nov 27 '06 #26

"Noah Roberts" <ro**********@gmail.comwrote in message
news:11*********************@h54g2000cwb.googlegro ups.com...
>
Howard wrote:
>
But I like my pointers, I need my pointers, and nobody's gonna
deprive
me of 'em! :-)

Feel free to write bad, exception unsafe and leaky code.
That's not my problem.


What makes you think I write bad, leaky code? If you're saying that all
code using new and delete is bad and leaky, then you're simply incorrect.
Granted, exception safety is more difficult to ensure with raw pointers,
but
not impossible.

Depends on the guarantee required. There may very well be cases when
using raw pointers makes the strong guarantee unfeasable or impossible
to provide. It can also be pretty difficult to provide even the basic
guarantee when using raw pointers. This is what RAII has been invented
to answer. More often than not people that use raw pointers aren't
even aware of the miriad of possible leaks in their code.
No argument from me. I agree 100% that RAII is the preferred way to go. I
just take exception (excuse the pun) with the opinion that it's "wrong" to
use pointers, or that because there are pointers in my code I must be
writing bad, leaky code.

-Howard
Nov 27 '06 #27
On 21 Nov 2006 01:32:09 -0800, "Master Programmer"
<ma***************@outgun.comwrote:
>I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers. I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

Any comparisons out there?

Thanks
The Grand Master

This ng needs a troll from time to time. So peaceful, so long. Now a
troll apperas, and everyone runs to answer. Where is the old "Don't
feed the trolls " warning?

Zara
Nov 28 '06 #28

Zara wrote:
>
This ng needs a troll from time to time. So peaceful, so long. Now a
troll apperas, and everyone runs to answer. Where is the old "Don't
feed the trolls " warning?

Zara
lol! (that you yourself added to this topic)

Nov 28 '06 #29

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Dave Boland | last post by:
The other day I was asked if there is an open source replacement for VB6 that is cross-platform. I spent a little bit of time at Barnes-Noble and looking at news groups, but don't have a good...
6
by: gnu | last post by:
Rationale to use Linux ======================= - I can't afford paying for $199 for the license of an OS that's arguably better thank Linux for each of 10 computers I have. - I want to be...
99
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a...
9
by: Freejack | last post by:
Recently I've been spending some time googling around for ideas for an alloca() replacement that could function in a strict ANSI C environment. As we all know, alloca() is system/arch dependant. ...
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
5
by: VB Programmer | last post by:
First time I've heard of it... http://www.microsoft.com/products/expression/en/default.mspx Will this be a replacement for VS.NET or Frontpage? How does this technology fit in? Is the...
4
by: Phil Sandler | last post by:
Hello, What is the fastest/most efficient way of doing string replacement in csharp/.net? An example would be: "Hello, my name is {FirstName}, and I live in the town of {City} with my wife...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.