C++, is it Dead?

M

Mateusz Loskot

Henrik said:
Yes you're right and I agree with you. If Microsoft says they don't
want it to work on Linux, then it won't work on Linux. Thats what I
like about C++. Microsoft doesn't own it and cannot make anything but
minor enhancements to the syntax and runtime.
Right.

However one plan I heard was that future Windows should rely on .NET
for programming.

Sure, but Microsoft won't get rid of COM and C/C++ development.
If they would want to, then users had to wait a few years for Vista ;-)
I have had friends who asked me "how do I do this or this" and they
are just too lazy to open up the manual.

I have similar experience after I worked with .NET-only developers :)
Another opinion I was getting frequently was "command line? who is using
command line these days. Microsoft invented GUI to make users happy with
mouse" :)

Ironicaly, Microsoft have been forcing to use GUI but now is promoting
his brand new command line - MSH :)
So I said to them that they can read about it here and here but the
correct answer was so and so. They responded that they could do that
some other time when they got retired. Really bad I think. Sometimes
I wanted to say to them that they might as well leave their brain at
home as well.

I met similar people on my way of life, but I started to not to help
them very fast, just giving URI's where they can find instructions :)
Heh. You're completely right :) Not all of them can do safe
programming even WITH .NET (no pointers for instance) and WITH
documentation.

Sad but truth.
It's very simple. C++ runtime library is from 1990's. .NET was
created in 2001 and has been since then improved in 2005. Don't you
think that .NET learned from other languages mistakes and wanted to
find solutions to make it even better and easier to use?

I can't imagine the way you're trying compare usability of libraries for
such different languages as C++ and C#. Sorry.
If I would be a language designer I would first do what others did
good and extend it to make it better. Learn from others mistakes, no?
:)

That's obvious, but I don't think C# is an absolute after Java and C++.
Therefore it's not a surprise that .NET runtime library is better
in many ways.

It's different, completely different. Certainly, there are many many
things missing in C++ standard library but you can use Boost libiraries
or many other third-party libs. So, finally, you have also complete
environment.

I think we should stop this discussion because it
stareted to be OT here ;-)

Cheers
 
H

Henrik Goldman

What language?

It's an example of C++/CLI.

However the question purely nonsense.
Let me point something out. If you want to use .NET and have a library which
is designed for .NET you need to follow the rules specified by .NET. It's
that simple.

I have been saying all along that it doesn't matter about language. Do you
actually understand the keywords you posted? ^ is a C++/CLI reference
operator for creating variables on the managed heap. We are talking about
garbage collected variables which are typesafe and which you cannot do
pointer operations on.
C++ doesn't have garbage collection and thus such constructs would have to
be pointers or references.
Before talking about new syntax, perhaps you should understand what it's
actually good for.

I'm saying that theoretically you could have a common library for C++ which
would do the same as the .NET library does for it's supported languages.

-- Henrik
 
H

Henrik Goldman

I have similar experience after I worked with .NET-only developers :)
Another opinion I was getting frequently was "command line? who is using
command line these days. Microsoft invented GUI to make users happy with
mouse" :)

Recently I was very lazy and my college didn't bother to program so I
invented a new concept: Programming without keyboards. By copy pasting with
mouse I was able to solve my problems in seconds ;) I think if I will
develop this technique I can be a l33t mouse-enabled programmer ;)

On the other hand I like using my keyboard ... some times ;)
Ironicaly, Microsoft have been forcing to use GUI but now is promoting
his brand new command line - MSH :)

Heh I would like to know what the average .NET programmer would say about
that. Probably: "oh... I can't use it... it's too useless because it doesn't
have intellisense" ;)
Isn't is funny that people can come up with a thousand reasons of why
something is bad and still not mention their own lack of skills? :)
I met similar people on my way of life, but I started to not to help
them very fast, just giving URI's where they can find instructions :)

I should do the same. Often I've wanted to tell people "oh why don't you
just grow some skills".
On the other hand I like to answer peoples questions. It gets me to learn
new stuff fast and I eventually get a GOD status because I know how to type
some keywords into google ... ph34r ;-)
Sad but truth.

One of the most amusing (and annoying) examples was when one friend asked
about how to write a crypto-related application FAST. I was telling him...
just because you wrote it, it doesn't mean it's safe if you don't undestand
how it works.
I can't imagine the way you're trying compare usability of libraries for
such different languages as C++ and C#. Sorry.

Here is a simple XML parser written in C# which would have costed much more
time to do in C++:

r = new XmlTextReader(args[0]);
while (r.Read())
{
switch (r.NodeType)
{
case XmlNodeType.Element:
attr = new Hashtable();
if (r.HasAttributes)
{
for (i = 0; i < r.AttributeCount; i++)
{
r.MoveToAttribute(i);
attr.Add(r.Name, r.Value);
}
r.MoveToElement();
}

....

It's just a piece of code but as you can see the syntax is 90% the same.
There is nothing here that could not have been done in C++.
It's not just about syntax. It's about feature completeness of the library.
For instance I can create a SOAP network client with 5 lines of code with
..NET. It would take alot more work to do the same using a C library. (Yes I
did an implementation in both languages and gSoap library was much less
clean to work with).
It's different, completely different. Certainly, there are many many
things missing in C++ standard library but you can use Boost libiraries
or many other third-party libs. So, finally, you have also complete
environment.

Yeah. As another person stated it's good to have democracy. It's good to
have the option to use another vendors libraries. However I feel that some
of the old API's would be nice to get rid of and get replaced with more well
designed components.
I think we should stop this discussion because it
stareted to be OT here ;-)

Yeah you're right. I think I've gotten my point through anyway.

-- Henrik
 
V

VirtualDev

personnally i'm considering myself as a begginner C++ intermediate .net
developper and my love to learn more in C++ is huge but when i compare
the offered opportunities for .net . i can't resist,
you said:
I'm saying that theoretically you could have a common library for C++ which
would do the same as the .NET library does for it's supported languages.
and i know that's true even i can add that in C++ a developer will
have more flexibility to ddo thing(ex: Mutli-inheritance) but what
should we do? as we love C++ and want it to grow and to be adapted to
new things. should we try to create our own Framework. and if not, what
are the other choices that we have?
 
H

Henrik Goldman

I'm saying that theoretically you could have a common library for C++
and i know that's true even i can add that in C++ a developer will
have more flexibility to ddo thing(ex: Mutli-inheritance) but what
should we do? as we love C++ and want it to grow and to be adapted to
new things. should we try to create our own Framework. and if not, what
are the other choices that we have?

You're naturally free to implement everything you want. One problem with
opensource is the democracy thing. There is no supervised control of the
development and for a library of this kind it will be needed. This is also
one reason why Microsoft is succesful. It's streamlined, supervised and good
documented. It has the resources to do things that most opensource projects
cannot do.
However as some people pointed out boost is certainly a way to go and solves
some problems.

QT from Trolltech is another way. It's a library which does more then just
GUI and implements lots of other functionality in a platform independent
way. Thats quite nice. The upside is that it has very very large platform
support but naturally it's comercial and costs money.
I'm working with a company who uses QT every day and they say basicly that
it has boosted their development and they will be ready to port their code
to linux (from Windows) when they get better time.

-- Henrik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top