Connecting Tech Pros Worldwide Forums | Help | Site Map

survival of c++

jimmy
Guest
 
Posts: n/a
#1: Jul 22 '05
I am presently working in C++ .It is flexible and efficient.But it is
not the reasons for the language to survive as hardware is running
ahead the capabilities of software(why efficiency?).Java is a cool
language and .NET too even for mobile devices and embedded
systems.Anybody can give some valid reasons so that I can understaand
C++ will survive in the coming years.

Ioannis Vranos
Guest
 
Posts: n/a
#2: Jul 22 '05

re: survival of c++


jimmy wrote:[color=blue]
> I am presently working in C++ .It is flexible and efficient.But it is
> not the reasons for the language to survive as hardware is running
> ahead the capabilities of software(why efficiency?).Java is a cool
> language and .NET too even for mobile devices and embedded
> systems.Anybody can give some valid reasons so that I can understaand
> C++ will survive in the coming years.[/color]



A useful information here is that there is an upcoming standard for
C++/CLI extensions.


Here are parts of a message I sent in another newsgroup:




Today in .NET with C++ we work in this way:


__gc class whatever
{
// ...
};


// Equivalent to whatever *p=__gc new whatever;
whatever *p=new whatever;


// Managed type in non GC heap
whatever *p=__nogc new whatever;


class whatever
{
// ...
};

// Here not garbage collected
whatever *p=new whatever;





With the new syntax:


ref class whatever
{
// ...
};


whatever ^p=gcnew whatever;


// This will be managed type in non GC heap
whatever *p=new whatever;



Also it is possible:


// GC object (working as if it is) in the stack.
// It is destroyed at the end of its scope
// (deterministic finalisation)
whatever x;



C++/CLI *is* more natural.



With C++ it is possible to do more things than with C#, since you can
work in the managed and unmanaged worlds combined.



C++/CLI does not replace ISO C++, it is a set of extensions to ISO C++.

One can also use ISO C++ for .NET applications (I do!). I am programming
in mixed mode, which is the most efficient and portable - portability
regarding C++ code recompiling only. I do not care for portability of
the compiled .exe to another platform as it is, since the API is not
portable anyway.

I will consider C++/CLI restricted use, only when I will want to make my
interfaces accessible in other .NET languages, while the definitions
themselves have not be in pure "C++/CLI". This is the kind of
flexibility only C++ has.



For example you can make a std::string to String * conversion easily.
C++ is better than C#!






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Aguilar, James
Guest
 
Posts: n/a
#3: Jul 22 '05

re: survival of c++


"jimmy" <jimmyvarghesemca@hotmail.com> wrote in message
news:355b7859.0407110057.297f90e4@posting.google.c om...[color=blue]
> I am presently working in C++ .It is flexible and efficient.But it is
> not the reasons for the language to survive as hardware is running
> ahead the capabilities of software(why efficiency?).Java is a cool
> language and .NET too even for mobile devices and embedded
> systems.Anybody can give some valid reasons so that I can understaand
> C++ will survive in the coming years.[/color]

It honestly doesn't really matter that much. The dominant language will
probably be one very like C++ for a long time to come, even if C++ isn't
exactly it. Witness: Java. Java is basically C++ with a garbage collector
and pointers out the wazoo. In any case, the more you program, and the more
you practice, the better prepared you will be for any type of programming
that comes up in the future, so it is not really _that_ important what
language it is in.

The words of a student.


JKop
Guest
 
Posts: n/a
#4: Jul 22 '05

re: survival of c++


Aguilar, James posted:
[color=blue]
> "jimmy" <jimmyvarghesemca@hotmail.com> wrote in message
> news:355b7859.0407110057.297f90e4@posting.google.c om...[color=green]
>> I am presently working in C++ .It is flexible and[/color][/color]
efficient.But it is[color=blue][color=green]
>> not the reasons for the language to survive as hardware[/color][/color]
is running[color=blue][color=green]
>> ahead the capabilities of software(why efficiency?).Java[/color][/color]
is a cool[color=blue][color=green]
>> language and .NET too even for mobile devices and[/color][/color]
embedded[color=blue][color=green]
>> systems.Anybody can give some valid reasons so that I[/color][/color]
can understaand[color=blue][color=green]
>> C++ will survive in the coming years.[/color]
>
> It honestly doesn't really matter that much. The[/color]
dominant language[color=blue]
> will probably be one very like C++ for a long time to[/color]
come, even if C++[color=blue]
> isn't exactly it. Witness: Java. Java is basically C++[/color]
with a garbage[color=blue]
> collector and pointers out the wazoo. In any case, the[/color]
more you[color=blue]
> program, and the more you practice, the better prepared[/color]
you will be for[color=blue]
> any type of programming that comes up in the future, so[/color]
it is not[color=blue]
> really _that_ important what language it is in.
>
> The words of a student.[/color]


Why are people making such a big deal out of garbage
collection?! You can use a class to do it in C++.

-JKop
Ioannis Vranos
Guest
 
Posts: n/a
#5: Jul 22 '05

re: survival of c++


JKop wrote:
[color=blue]
> Why are people making such a big deal out of garbage
> collection?! You can use a class to do it in C++.[/color]


Well, it is a nice thing to have where affordable. There are many
garbage collectors out there especially for C++.






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
John Harrison
Guest
 
Posts: n/a
#6: Jul 22 '05

re: survival of c++


>[color=blue]
>
> Why are people making such a big deal out of garbage
> collection?! You can use a class to do it in C++.
>[/color]

First requirement of garbage collection is to know where every single
pointer is in your program. That's not easy to arrange in C++.

john

Julie
Guest
 
Posts: n/a
#7: Jul 22 '05

re: survival of c++


jimmy wrote:[color=blue]
>
> I am presently working in C++ .It is flexible and efficient.But it is
> not the reasons for the language to survive as hardware is running
> ahead the capabilities of software(why efficiency?).Java is a cool
> language and .NET too even for mobile devices and embedded
> systems.Anybody can give some valid reasons so that I can understaand
> C++ will survive in the coming years.[/color]

The first problem is that you can't really compare C++/C#/Java -- they all have
different intended audiences and capabilities.

C++ is a systems programming language. It can be used as an applications
programming language.

C# is a single-platform applications programming language.

Java is a multi-platform applications programming language.

Historically, C++ has been used for just about everything. Before C# and Java,
there weren't a lot of widely available alternatives, so it was used a lot for
projects that would now be better suited w/ a more applications oriented
language.

Now that there are more choices, more informed project managers will be using
the most appropriate language, which will mean that what may have been written
in C++ previously will now (more appropriately) be written in C# or Java.
However, that doesn't mean that the use of C++ for its intended purpose will
diminish. With the exception of the ill-informed pm, C++ will continue to be
used for systems-level programming projects.
Ioannis Vranos
Guest
 
Posts: n/a
#8: Jul 22 '05

re: survival of c++


Julie wrote:
[color=blue]
> The first problem is that you can't really compare C++/C#/Java -- they all have
> different intended audiences and capabilities.
>
> C++ is a systems programming language. It can be used as an applications
> programming language.
>
> C# is a single-platform applications programming language.[/color]


Actually it is standardised and there is a port in GNU/Linux along with
the CLI framework, Mono. However it lacks a standard library of its own,
so basically it can't live outside of a framework, it will always be
system dependent language.

[color=blue]
> Java is a multi-platform applications programming language.[/color]


And proprietary.


[color=blue]
> Historically, C++ has been used for just about everything. Before C# and Java,
> there weren't a lot of widely available alternatives, so it was used a lot for
> projects that would now be better suited w/ a more applications oriented
> language.[/color]


C++ is a multiparadigm language, it supports 4 paradigms. Each paradigm
is supported *well*(1) with optimal space and time efficiencies.

(1) implies that it has all the high level constructs necessary to be
suitable for "application programming".


Always there have been other "application programming" languages before
C# and Java. Consider VB, Delphi, etc.


[color=blue]
> Now that there are more choices, more informed project managers will be using
> the most appropriate language, which will mean that what may have been written
> in C++ previously will now (more appropriately) be written in C# or Java.[/color]


:-) Perhaps I will learn C# after some revisions (to let it mature a
bit), and I wonder what "extra" it provides to C++.

I guess it is the same situation when after C I learned Pascal. It was
piece of cake, since C abilities were a superset of Pascal so I mapped
Pascal stuff to C equivalents in my mind and learned it in 2-3 days. And
I found nothing more that C lacked, while the opposite was true.

[color=blue]
> However, that doesn't mean that the use of C++ for its intended purpose will
> diminish. With the exception of the ill-informed pm, C++ will continue to be
> used for systems-level programming projects.[/color]






Regards,

Ioannis Vranos


http://www23.brinkster.com/noicys
Ioannis Vranos
Guest
 
Posts: n/a
#9: Jul 22 '05

re: survival of c++


Ioannis Vranos wrote:

[color=blue]
> :-) Perhaps I will learn C# after some revisions (to let it mature a
> bit), and I wonder what "extra" it provides to C++.[/color]


And essentially I know what C# provides since I have been learning .NET
programming, and .NET provides the same API and constructs for all
languages. So C# so far supports only OO programming with single
inheritance only, and it emulates multiple inheritance with the use of
interfaces. Nothing else.

So where is it better?






Regards,

Ioannis Vranos


http://www23.brinkster.com/noicys
Gianni Mariani
Guest
 
Posts: n/a
#10: Jul 22 '05

re: survival of c++


jimmy wrote:[color=blue]
> I am presently working in C++ .It is flexible and efficient.But it is
> not the reasons for the language to survive as hardware is running
> ahead the capabilities of software(why efficiency?).Java is a cool
> language and .NET too even for mobile devices and embedded
> systems.Anybody can give some valid reasons so that I can understaand
> C++ will survive in the coming years.[/color]

"Cool". Is that a technical term ?

Probably the buggest advancement in programmer productivity recently has
been automatic memory management in the name of garbage collectors or
smart pointers.

In C++ you can use both. You also get to use RAII not just in smart
pointers but also for locks, files etc which makes programmers even more
productive.

Templated (or generics) programming is also a huge programmer
productivity boost.

These are all things you can use today with C++. They're stable
features and can be used in critical applications. Compilers are widely
available and they're actively being developed.

The biggest drawback of C++ is the learning curve, however, if you start
putting all these features into Java, you're going to get the same
learning curve anyway.

IMHO, text based languages will be a thing of the past. The text editor
is simply a poor input tool for the complex systems we put together
today so eventually, all text based languages are toast. (IMHO that is).
Since today, we have no viable alternative, we're stuck.

G
Fraser Ross
Guest
 
Posts: n/a
#11: Jul 22 '05

re: survival of c++



"Ioannis Vranos"[color=blue]
> I guess it is the same situation when after C I learned Pascal. It was
> piece of cake, since C abilities were a superset of Pascal so I mapped
> Pascal stuff to C equivalents in my mind and learned it in 2-3 days. And
> I found nothing more that C lacked, while the opposite was true.[/color]

Pascal has function types and the closest thing in C++ is a pointer to a
function. Also Pascal has the WITH keyword which C++ hasn't so C and C++
are not entirely a superset of Pascal.

Fraser.


Ioannis Vranos
Guest
 
Posts: n/a
#12: Jul 22 '05

re: survival of c++


Fraser Ross wrote:
[color=blue]
> Pascal has function types and the closest thing in C++ is a pointer to a
> function. Also Pascal has the WITH keyword which C++ hasn't so C and C++
> are not entirely a superset of Pascal.[/color]


:-) WITH is extremely insignificant. Can you give an example what do you
mean with "function types"?

Indeed strictly speaking C is not a superset of Pascal (since for
example you can define a function inside an other function and it has
procedures), however what I meant is that C has more abilities than
Pascal and the procedures, WITH etc stuff don't make any major
difference in terms of length of source for example.






Regards,

Ioannis Vranos


http://www23.brinkster.com/noicys
Phlip
Guest
 
Posts: n/a
#13: Jul 22 '05

re: survival of c++


jimmy wrote:
[color=blue]
> I am presently working in C++ .It is flexible and efficient.But it is
> not the reasons for the language to survive as hardware is running
> ahead the capabilities of software(why efficiency?).Java is a cool
> language and .NET too even for mobile devices and embedded
> systems.Anybody can give some valid reasons so that I can understaand
> C++ will survive in the coming years.[/color]

Those languages (Java & C#) crippled themselves by trying to steal mindshare

The authors of Java said, "Hey, if we invent a language that looks kind'a
like C++, but doesn't have stray pointers or bugs in its polymorphism
system, we can get C++ programmers to think they should use it, and we will
have a guaranteed audience". And it worked.

Imitation is the sincerest form of flattery. But Java has plenty of
opportunities for stray pointing, zombie objects, broken exception
specifications, etc. A language invented to fake-out another language, not
invented to express the latest software engineering ideals, sells itself
short.

The big divide in OO languages is between static and dynamic typing. The
latter, compared to C++, works by inheriting everything from a magic base
class called "Object", which has every method that all its derivations have.
You can pass a reference to any object into any function, so long as that
function only uses methods that particular object has.

Ruby is a bigger threat to C++.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces


Gianni Mariani
Guest
 
Posts: n/a
#14: Jul 22 '05

re: survival of c++


Fraser Ross wrote:[color=blue]
> "Ioannis Vranos"
>[color=green]
>>I guess it is the same situation when after C I learned Pascal. It was
>>piece of cake, since C abilities were a superset of Pascal so I mapped
>>Pascal stuff to C equivalents in my mind and learned it in 2-3 days. And
>>I found nothing more that C lacked, while the opposite was true.[/color]
>
>
> Pascal has function types and the closest thing in C++ is a pointer to a
> function. Also Pascal has the WITH keyword which C++ hasn't so C and C++
> are not entirely a superset of Pascal.[/color]

WITH is a nightmare. In C++ you can use references that do more or less
the same thing in a much easier way than WITH statements.

It's been discussed a number of times on comp.std.c++
http://groups.google.com/groups?hl=e...ews.sirius.com

"with" is one of those features which seemed nice at the time but after
having had a number of problems with it, it's just not worth the hassle.

C++ references can be used to solve almost the same problem in a more
generic way.

G
Fraser Ross
Guest
 
Posts: n/a
#15: Jul 22 '05

re: survival of c++



"Ioannis Vranos"[color=blue]
> :-) WITH is extremely insignificant. Can you give an example what do you
> mean with "function types"?[/color]

They must be similar to references but can be uninitialised and changed. An
instance of a function type can be made and assigned a real function with
the same signature and later reassigned a different function. The real
function can be called through the function type instance.

Fraser.


Ioannis Vranos
Guest
 
Posts: n/a
#16: Jul 22 '05

re: survival of c++


Fraser Ross wrote:
[color=blue]
> They must be similar to references but can be uninitialised and changed. An
> instance of a function type can be made and assigned a real function with
> the same signature and later reassigned a different function. The real
> function can be called through the function type instance.[/color]



Well this sounds similar to pointers to functions.






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
JKop
Guest
 
Posts: n/a
#17: Jul 22 '05

re: survival of c++


Phlip posted:
[color=blue]
> "Hey, if we invent a language that looks kind'a like C++, but doesn't
> have stray pointers or bugs in its polymorphism system, we can get C++
> programmers to think they should use it, and we will have a guaranteed
> audience". And it worked.[/color]


May aswell put stabilizers on your bike while you're at it.


Am I the only person in the universe that hasn't had problems with "stray
pointers"? I feel I must be missing something here, because it seems oh so
simple.


-JKop
David Eng
Guest
 
Posts: n/a
#18: Jul 22 '05

re: survival of c++


"jimmy" <jimmyvarghesemca@hotmail.com> wrote in message
news:355b7859.0407110057.297f90e4@posting.google.c om...[color=blue]
> I am presently working in C++ .It is flexible and efficient.But it is
> not the reasons for the language to survive as hardware is running
> ahead the capabilities of software(why efficiency?).Java is a cool
> language and .NET too even for mobile devices and embedded
> systems.Anybody can give some valid reasons so that I can understaand
> C++ will survive in the coming years.[/color]

No one can predict the future. No one knows C++ or even Java will survive.
My experience tell me that mastering one programming language is not enough
in today's environment. The more languages you learn, the better programmer
you are. But you have to understand the relationship between these
languages. Here is the stack:

Java or C#
C/C++
Assembly
Machine Code

That is, if you want to be a good Java programmer, know C/C++ will help. If
you want to be a good C/C++ programmer, know Assembly will help. My
suggestion is know at least tow languages. I prefer C/C++ and Java, which
are platform and vendor independent. If you learn CORBA, it's very easy to
combine these two languages together so that you can choose the language
which can do the best job for a given project and communicate with each
other. My only suggestion is stay away from Microsoft technology, such as
C#/CLI stuff. The reason is Microsoft is never a leader but always a
follower in term of innovation. When she follows the leader to update her
technology, the technology usually doesn't have backward compatibility. For
example, with CLI (it follows J2EE), VB, COM, MFC, C++ programmers become
outdated. If you learn C#/CLI or so called C++/CLI, I am sure you will be
outdated after 5 years.

FYI: C++/CLI is the worst language you want to learn. Not only you have to
learn two sets of APIs, one from CLI and one from standard C++ library, but
also you have to know which one is suitable in which condition, which one is
better than the other in same condition, and which on is ....


Phlip
Guest
 
Posts: n/a
#19: Jul 22 '05

re: survival of c++


Ioannis Vranos wrote:
[color=blue]
> Well this sounds similar to pointers to functions.[/color]

Which are a feeb, mechanical attempt to provide "block closures".

Event-driven architectures are much more decoupled than passive ones. But
not many languages provide them, including many inexplicably popular
languages designed specifically to support event driven programming.

Here's a block closure in Ruby using the Tk library. Oval is a widget on the
screen. 'bind()' is a function that binds an event to a keystroke. When the
user clicks the first mouse button (sometimes incorrectly called the "Left
Mouse Button") on that oval, the {block} following the 'bind()' call
executes.

X = 42

oval.bind('Button-1') {
|event|
doc(event)
puts x.inspect()
}

Ruby statements between { and } (or begin and end) form an object, called a
block, which passes into any method on its left. That method can execute the
statements inside the block immediately, and can store the block as an
object, called a Proc, so something can call it later. The block links to
instances of variables seen from functions around it, such as our x, even
after such functions return. Each instance of the block links to a parallel
instance of each variable, so such variables persist until the block itself
destroys. Languages such as Perl and Smalltalk also use these "block
closures". They are more than a convenience: Variables must always have the
narrowest scope possible, and variables linked to a block, such as x, have
the narrowest conceivable scope over an indefinite lifespan.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces


Phlip
Guest
 
Posts: n/a
#20: Jul 22 '05

re: survival of c++


> Am I the only person in the universe that hasn't had problems with "stray[color=blue]
> pointers"? I feel I must be missing something here, because it seems oh so
> simple.[/color]
[color=blue]
> -JKop[/color]

Someday, JKop may get to maintain legacy code not written by someone as
non-stupid as JKop. Then JKop will appreciate learning the smell and the
feel of various kinds of mystery crashes. Oh, this one feels like an array
overrun. Oh, that one feels like a double delete.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces


Julie
Guest
 
Posts: n/a
#21: Jul 22 '05

re: survival of c++


Ioannis Vranos wrote:[color=blue]
>
> Ioannis Vranos wrote:
>[color=green]
> > :-) Perhaps I will learn C# after some revisions (to let it mature a
> > bit), and I wonder what "extra" it provides to C++.[/color][/color]

No extra -- don't waste time trying to compare and contrast them as to which is
better, extra stuff, etc.

C# has a lot of its power in the supporting framework. The pure language,
aside from intrinsic garbage collection is very close to C++. So, I guess that
you *could* compare just the languages, but really, that has virtually no value
that I can see.

So, if you know C++, you already basically know C#. However, there is a pretty
big .NET framework that you must learn in order to really understand the whole
..NET thing.
[color=blue]
> And essentially I know what C# provides since I have been learning .NET
> programming, and .NET provides the same API and constructs for all
> languages. So C# so far supports only OO programming with single
> inheritance only, and it emulates multiple inheritance with the use of
> interfaces. Nothing else.[/color]

..NET supports VB.NET, C#, and managed C++ (and some others) -- they all have
access to the same framework, and impose the same restrictions.

Multiple inheritance isn't emulated in .NET, it flat out isn't supported. The
only MI that is supported is multiple interface.
E. Robert Tisdale
Guest
 
Posts: n/a
#22: Jul 22 '05

re: survival of c++


jimmy wrote:
[color=blue]
> I am presently working in C++. It is flexible and efficient.
> But it is not the reasons for the language to survive
> as hardware is running ahead the capabilities of software (why efficiency?).
> Java is a cool language and .NET too even for mobile devices and embedded systems.
> Can anybody give some valid reasons so that I can understand why
> C++ will survive in the coming years.[/color]

You should expect C++ to survive for a long time
because there is no practical replacement for it.
It is practically impossible to write device drivers,
real-time programs, operating systems or high performance applications
in Java so Java can *never* replace C++.
It is still very dangerous to invest in Java development
because there is *no* publicly owned standard for Java.
Ioannis Vranos
Guest
 
Posts: n/a
#23: Jul 22 '05

re: survival of c++


Julie wrote:
[color=blue]
> No extra -- don't waste time trying to compare and contrast them as to which is
> better, extra stuff, etc.
>
> C# has a lot of its power in the supporting framework. The pure language,
> aside from intrinsic garbage collection is very close to C++. So, I guess that
> you *could* compare just the languages, but really, that has virtually no value
> that I can see.
>
> So, if you know C++, you already basically know C#. However, there is a pretty
> big .NET framework that you must learn in order to really understand the whole
> ..NET thing.[/color]


Yes, the framework is vast and is expanding, you can't learn everything
one has to specialise. The XML section for example is a world of its
own. The same applies for Web services, Encryption, Databases, GDI+,
etc. You can only learn the basics and then specialise.

But that has not anything to do with C#, itself, so why "C# will prevail
and C++ will be used only for systems programming" is not clear to me.
Actually it reminds me the VB 6 days, when I heard the same stuff, and
never happened, and actually it was harder to make Windows GUI
applications in C++ than VB (at least in VS, because there was BC++
Builder), but in 1991, C++ was at 2.6 million programmers worldwide
while VB was around 1 million (and Java was third).


Now with the RAD stuff (the same RAD for all languages in VS), I see it
more difficult why "C# would prevail".


There is an ongoing serious discussion in clc++m about C++/CLI and I
think you should check it. An interesting thing is that C++/CLI will
support making GC objects (looking as if being ) in the stack, and
destroyed at the end of their scope (deterministic finalisation), along
with managed objects in unmanaged heap which is possible nowadays too.


So

ref class myclass
{
// ...
};



void whatever()
{
myclass x;

// ...


// x is destroyed at the end of the scope
}


myclass ^x=gcnew myclass;


// "Managed type" object in the unmanaged heap
myclass *y=new myclass;

// ...

delete y;



The stack stuff especially, can't be done with C# and probably will not
in the next version of VS, so actually C++ will be more .NET than C# and
VB, at least for the coming period.






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Ioannis Vranos
Guest
 
Posts: n/a
#24: Jul 22 '05

re: survival of c++


David Eng wrote:
[color=blue]
> No one can predict the future. No one knows C++ or even Java will survive.[/color]



However standardised languages will always be around. So even if for
example VB becomes the dominant programming language ( ;-) ), there will
always be some C++ compiler around since C++ is standardised. Consider
HTML, it will always be around, in the sense that it will be recognised.



[color=blue]
> My experience tell me that mastering one programming language is not enough
> in today's environment. The more languages you learn, the better programmer
> you are. But you have to understand the relationship between these
> languages. Here is the stack:
>
> Java or C#
> C/C++
> Assembly
> Machine Code
>
> That is, if you want to be a good Java programmer, know C/C++ will help. If
> you want to be a good C/C++ programmer, know Assembly will help. My
> suggestion is know at least tow languages. I prefer C/C++ and Java, which
> are platform and vendor independent.[/color]



Actually from your other posts I think you prefer Java. :-)

[color=blue]
> If you learn C#/CLI or so called C++/CLI, I am sure you will be
> outdated after 5 years.[/color]


Why?


[color=blue]
> FYI: C++/CLI is the worst language you want to learn. Not only you have to
> learn two sets of APIs, one from CLI and one from standard C++ library, but[/color]


No, C++/CLI has not any API. CLI has a small, fundamental API of its own.


Myself always try to be system-neutral as much as possible. That's why I
have not learned Java unless it becomes standardised, and only learn a
proprietary language (like Java) only when I have to.


C# and CLI on the other hand are standardised, so there is already a
port of them to GNU/Linux even from these first days.

C# programmers although, tend to have the same naive with Java ones
approach, that C# can do everything, perhaps because these days everyone
making a form with drag 'n drop considers himself a programmer. :-)


On the other hand, C++/CLI and CLI are standards so there are going to
be many implementations of them in many platforms.


So the better thing would be for the company that owns Java, to
standardise it along with the VM, so as many others to be able to
innovate in the platform and it can always will have the leading role in
Java evolution, instead of trying to sell its own PCs with its own OS
and its own programming language, Java!

That would be the best thing for Java (and then I would learn it too).






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Robbie Hatley
Guest
 
Posts: n/a
#25: Jul 22 '05

re: survival of c++



"Fraser Ross" <fraserATmembers.v21.co.unitedkingdom> wrote:
[color=blue]
> "Ioannis Vranos"[color=green]
> > I guess it is the same situation when after C I learned Pascal. It was
> > piece of cake, since C abilities were a superset of Pascal so I mapped
> > Pascal stuff to C equivalents in my mind and learned it in 2-3 days. And
> > I found nothing more that C lacked, while the opposite was true.[/color]
>
> Pascal has function types and the closest thing in C++ is a pointer to a
> function.[/color]

C and C++ have function types. For example, in the
following, "Crunch" is a function type:

#include <iostream>
typedef double Crunch(int, char);
void Bite(Crunch Munch) {std::cout << Munch(7, 5);};
double Chomp(int a, char b) {return (double)(a*b);}
int main()
{
Bite(Chomp);
return 0;
}

Looks useless, but actually, I've made good use of
that scheme to pass a function of a given type to
a second function called "Recurse" which executes
the first function once for every subdirectory of
the current directory. Very good for file utilities
such as duplicate-file removers and file renamers.

--
Cheers,
Robbie Hatley
Tustin, CA, USA
email: lonewolfintj at pacbell dot net
web: home dot pacbell dot net slant earnur slant






Rob Williscroft
Guest
 
Posts: n/a
#26: Jul 22 '05

re: survival of c++


Robbie Hatley wrote in news:40f261a6$1_2@127.0.0.1 in comp.lang.c++:
[color=blue]
>
> "Fraser Ross" <fraserATmembers.v21.co.unitedkingdom> wrote:
>[color=green]
>> "Ioannis Vranos"[color=darkred]
>> > I guess it is the same situation when after C I learned Pascal. It
>> > was piece of cake, since C abilities were a superset of Pascal so I
>> > mapped Pascal stuff to C equivalents in my mind and learned it in
>> > 2-3 days. And I found nothing more that C lacked, while the
>> > opposite was true.[/color]
>>
>> Pascal has function types and the closest thing in C++ is a pointer
>> to a function.[/color]
>
> C and C++ have function types. For example, in the
> following, "Crunch" is a function type:
>[/color]

C++ function's have a type and you can typedef that type
as you do below, however you can't pass function's around,
you can only pass around function-pointers.
[color=blue]
> #include <iostream>
> typedef double Crunch(int, char);
> void Bite(Crunch Munch) {std::cout << Munch(7, 5);};[/color]

C++ has *decayed* the paramiter type, Byte()'s full signature is:

void Byte( double (*Munch)( int, char ) );
[color=blue]
> double Chomp(int a, char b) {return (double)(a*b);}
> int main()
> {
> Bite(Chomp);[/color]

C++ *decay's* 'Chomp' from a function to a function-pointer.
[color=blue]
> return 0;
> }
>[/color]

It's unlikely you'll ever notice the diffrence, so here's
an illustration that doesn't compile:

#include <iostream>
#include <ostream>

template < typename T > void f( T arg )
{
T a = arg; /* <- this will be the problem line */
a();
}

typedef void func_t();

void g()
{
std::cout << "g()\n";
}

int main()
{
f< func_t >( g );

/* To get this to compile remove the above line and uncomment the next:
*/

// f< func_t * >( g );
}


A similar thing happens with arrays:

void f( int array[3] )
{
}

The /real/ signature of the above is:

void f( int *array );


Rob.
--
http://www.victim-prime.dsl.pipex.com/
Anonymous
Guest
 
Posts: n/a
#27: Jul 22 '05

re: survival of c++



Everybody seems to be bothered about the "object oriented features" and "ready
to code" features. I think Java, C# etc has exaggerated these things to make it
applicable to a narrow subset of problem solving. In due course what has
happened is, it has lost the fundamental feature of flexibility. When people
talk about C/C++ it is a bridge between low level language and a high level
language. Java,C# etc very high level language. don’t forget that these are
developed on C++. But can you imagine some language developed on Java/C#. Jython
comes to my mind, but I have seen how it performs over native python Guido has
developed. When ever there is requirement of high level performance, it is very
difficult to do with high level languages. C/C++ can be tuned to get the maximum,
which is very essential for big applications.
The higher the language in the ladder, the more resource crunchy it will be.
Unless a high level language, is developed from scratch like c/c++ it will tend
to be weaker in performance and narrower in its scope. Can you imagine highly
graphical intensive work done in any of the high level language above mentioned
? I am sure Java will be lacking very much compared to c++, also java is not
supposed to do that, though it supports. I don’t know any industrial CAD
applications written in Java/C#. CAD is one such area where high performance is
very important.
When it comes to develop applications where performance is not very big
criteria but robustness in terms of garbage collections and other nuances, in a
small time, people will tend to vote for of java or c#. But when you say that
you are going to develop a product which will beat an existing application in
terms of performance, you will be thinking in terms of c++. Take the case of
Microsoft Office and OpenOffice.org. Compare the performance forgetting the
features. Compare IE,Mozilla with HotJava browser. You will get a feeling of how
much you will be getting from C++.
Conclusion: There is no argument that java/c# will kill c/c++ but the choices
for a particular application have increased. The number of application
originally written in C++ will diminish a bit, but that doesn’t mean that it
will be dead. It is like a new car manufacturer entering a already very
competitive automobile industry. The new guy has to place his product very well,
show the features, so that the intended customers will get interested. He will
be thinking to get a market share, but not to eliminate any established
manufacturer. So, as much you talk about the risk of C++ getting wiped out,
there is risk for Java/C# also if it cant match with new features of C++ like
extended support for generic programming in c++ will be standard part of C++
shortly.


--
Use our news server 'news.foorum.com' from anywhere.
More details at: http://nnrpinfo.go.foorum.com/
Thomas Matthews
Guest
 
Posts: n/a
#28: Jul 22 '05

re: survival of c++


jimmy wrote:
[color=blue]
> I am presently working in C++ .It is flexible and efficient.But it is
> not the reasons for the language to survive as hardware is running
> ahead the capabilities of software(why efficiency?).Java is a cool
> language and .NET too even for mobile devices and embedded
> systems.Anybody can give some valid reasons so that I can understaand
> C++ will survive in the coming years.[/color]

Perhaps we need a separate newsgroup for the
advocacy and fear of dying of languages.

Please, Please, Please, read the newsgroup articles
before worrying about C++ efficiency or life time.
It has it purposes and limitations as many of the
people who use it and define it will tell you.
As with any language, applying it to areas it isn't
efficient in will produce an inefficient system.
One doesn't use FORTRAN for a text system. In
general, BASIC isn't recommended for a compiled
executable, it is an interpretive language. (Yes,
I see the flames a comin'.)

The C++ language adds features to the C language and
has it own niches. It also has an "official" standard
which will help it to live long and prosper. After
all, it is the official programming language of any
olympics. ;-)

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Thomas Matthews
Guest
 
Posts: n/a
#29: Jul 22 '05

re: survival of c++


Julie wrote:
[color=blue]
> jimmy wrote:
>[color=green]
>>I am presently working in C++ .It is flexible and efficient.But it is
>>not the reasons for the language to survive as hardware is running
>>ahead the capabilities of software(why efficiency?).Java is a cool
>>language and .NET too even for mobile devices and embedded
>>systems.Anybody can give some valid reasons so that I can understaand
>>C++ will survive in the coming years.[/color]
>
>
> The first problem is that you can't really compare C++/C#/Java -- they all have
> different intended audiences and capabilities.
>
> C++ is a systems programming language. It can be used as an applications
> programming language.[/color]

Hey Julie, what exactly is a "systems" language. Nice catch phrase.
Is an operating system consider a "system". Is an application running
on an embedded system a "system?". Can one have an application running
in lisp on a System? Is C a systems language? Is FORTRAN?

Let us face the fact that C and C++ are languages. They have their own
paradigms. If you want to use Pascal for your system then it is a
system language. Let us not confine nor restrict programming languages.
One can say that hardware is easier to access using C and C++ than
using FORTRAN or Basic, but it can be done in those languages.

[color=blue]
> C# is a single-platform applications programming language.[/color]
Arrgghhhhhhh. C# is a language. If one wants to use it for multiple
platforms, then so be it. If someone wants to write an operating
system in it, so be it. So, what is the difference between an
applications programming language and a systems one? I've heard
COBOL is a systems language.

[color=blue]
> Java is a multi-platform applications programming language.[/color]
Arrrrgghhh, Uggggghhh. One nice benefit of Java is that it uses a
"standardized" virtual machine to run on. It emits a "byte-code"
language which will run on a virtual machine as long as the
virtual machine adheres to the standard (Is there one???). The
benefit is that if you can get a virtual machine for your platform,
you can execute Java programs without having to recompile. The
nice benefit of C and C++ is that if you have a compiler for them,
{and the program is compliant to the standard), you can compile
and execute them on another platform. The nice benefit about
FORTRAN is that it is a standard language. There are other
languages which have emitted "byte-codes" before. They just
didn't catch on.

[color=blue]
> Historically, C++ has been used for just about everything. Before C# and Java,
> there weren't a lot of widely available alternatives, so it was used a lot for
> projects that would now be better suited w/ a more applications oriented
> language.[/color]
Yep, there weren't a lot of alternative languages before C# or Java.
Hmmmm, let us pause a moment and reflect on our knowledge......
..... yep, nothing like: FORTRAN, BASIC, SNOBOL, MODULA 2, Pascal, LISP,
BASIC, Logo, Smalltalk, Prolog, Algol, Ada, PL/1, OPL, ZOPLZ, Assembly,
COBOL, and more. Yep, not a lot of them. Hang on whilst I feed my
aligator, change my banjo string and add more beers to the cooler.


[color=blue]
> Now that there are more choices, more informed project managers will be using
> the most appropriate language, which will mean that what may have been written
> in C++ previously will now (more appropriately) be written in C# or Java.
> However, that doesn't mean that the use of C++ for its intended purpose will
> diminish. With the exception of the ill-informed pm, C++ will continue to be
> used for systems-level programming projects.[/color]
"more informed project managers will be using the most appropriate
language", now let me clean up the beer I just spit out on my keyboard.
All of the project managers I worked for did not choose a language
that would make implementation of a project easier. Nope, they choose
the house language. Why? Probably because a lot of people know the
language and the can hire experienced people using that language.
There is a lot more at stake in producing a product (or finishing a
project) than a minor decision about a programming language.

The C++ language will live on as long as there are compiler vendors,
and support tool producers still delivering their products. The
same with C and Java. (I'm refrain from discussing C# as I have
a weighted bias against Microsoft.) So, has FORTRAN, LISP or
COBOL died? Nope, and they were among the first languages. So
why should C or C++ die out anytime soon? Java may die out when
Sun stops supporting it. Same with C# (but with M$).

Please see my rant in Shiva's Welcome.txt about not very platform
is a _________.

Pardon me, while take the transmission out of the bathtub.
(I still have to replant the grass in the front yard that was
under it.)

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Gianni Mariani
Guest
 
Posts: n/a
#30: Jul 22 '05

re: survival of c++


Anonymous wrote:
....if it cant match with new features of C++ like[color=blue]
> extended support for generic programming in c++ will be standard part of C++
> shortly.[/color]

Which feature are you referring to ?
[color=blue]
>[/color]
Ioannis Vranos
Guest
 
Posts: n/a
#31: Jul 22 '05

re: survival of c++


Rob Williscroft wrote:[color=blue]
> Robbie Hatley wrote in news:40f261a6$1_2@127.0.0.1 in comp.lang.c++:[/color]


There are some people that their messages do not show up in my Usenet
server, and as I can see they have strange addresses (127.0.0.1?).






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Ioannis Vranos
Guest
 
Posts: n/a
#32: Jul 22 '05

re: survival of c++


Thomas Matthews wrote:
[color=blue]
> Hey Julie, what exactly is a "systems" language. Nice catch phrase.[/color]


Actually a "systems programming language" is a language that can be used
to write software that does not depend on other software, like OSes. And
yes C++ is a systems programming language and almost all modern OSes are
written in C++ (and Java's VM too).

[color=blue]
> Arrgghhhhhhh. C# is a language. If one wants to use it for multiple
> platforms, then so be it. If someone wants to write an operating
> system in it, so be it. So, what is the difference between an[/color]



Actually you can not write an OS in C#. C# is suitable for application
programming only.


[color=blue]
> Arrrrgghhh, Uggggghhh. One nice benefit of Java is that it uses a
> "standardized" virtual machine to run on.[/color]


Actually it uses a company-defined VM. I can accept the standardised
within quotes term, if you mean that.




[color=blue]
> It emits a "byte-code"
> language which will run on a virtual machine as long as the
> virtual machine adheres to the standard (Is there one???).[/color]


No there is not.


[color=blue]
> Yep, there weren't a lot of alternative languages before C# or Java.
> Hmmmm, let us pause a moment and reflect on our knowledge......
> ..... yep, nothing like: FORTRAN, BASIC, SNOBOL, MODULA 2, Pascal, LISP,
> BASIC, Logo, Smalltalk, Prolog, Algol, Ada, PL/1, OPL, ZOPLZ, Assembly,
> COBOL, and more. Yep, not a lot of them. Hang on whilst I feed my
> aligator, change my banjo string and add more beers to the cooler.[/color]



And thousands of others (Clipper, ... :-P). Actually some day I may
check Objective C, there are many books of it floating around in local
book stores and that means there is a live community of it.


But she probably meant "Windows GUI specific", but still there has been
VB and J++ and Borland Delphi and of course Java :-P and probably others.

[color=blue]
> Java may die out when
> Sun stops supporting it. Same with C# (but with M$).[/color]


Actually C# will continue to be around since it is standardised and
always there will be some compiler for it. But C# lacks a standard
library of its own, so C# code will always be system-dependent, so C# is
basically just a syntax.






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
jeffc
Guest
 
Posts: n/a
#33: Jul 22 '05

re: survival of c++



"JKop" <NULL@NULL.NULL> wrote in message
news:UYaIc.4326$Z14.5220@news.indigo.ie...[color=blue][color=green]
> > Java is basically C++[/color]
> with a garbage[color=green]
> > collector and pointers out the wazoo.>[/color]
> Why are people making such a big deal out of garbage
> collection?![/color]

He didn't.
[color=blue]
> You can use a class to do it in C++.[/color]

And you can do OO programming in C too. What's your point?


jeffc
Guest
 
Posts: n/a
#34: Jul 22 '05

re: survival of c++



"Phlip" <phlip_cpp@yahoo.com> wrote in message
news:brhIc.226$4L7.83@newssvr33.news.prodigy.com.. .[color=blue][color=green]
> > Am I the only person in the universe that hasn't had problems with[/color][/color]
"stray[color=blue][color=green]
> > pointers"? I feel I must be missing something here, because it seems oh[/color][/color]
so[color=blue][color=green]
> > simple.[/color]
>[color=green]
> > -JKop[/color]
>
> Someday, JKop may get to maintain legacy code not written by someone as
> non-stupid as JKop. Then JKop will appreciate learning the smell and the
> feel of various kinds of mystery crashes. Oh, this one feels like an array
> overrun. Oh, that one feels like a double delete.[/color]

Just got done with one of those. The application is written on Windows for
a proprietary OS production environment. The application runs fine on the
Windows simulator. In production it crashes. Windows has a debugger (but
we don't need a debugger there because it works fine.) The production OS
does not have a debugger (where it is needed.) Took me 4 days to figure out
that bad boy. Turns out it was a pointer that someone forgot to initialize
to 0.


Julie
Guest
 
Posts: n/a
#35: Jul 22 '05

re: survival of c++


Ioannis Vranos wrote:[color=blue]
>
> Julie wrote:
>[color=green]
> > No extra -- don't waste time trying to compare and contrast them as to which is
> > better, extra stuff, etc.
> >
> > C# has a lot of its power in the supporting framework. The pure language,
> > aside from intrinsic garbage collection is very close to C++. So, I guess that
> > you *could* compare just the languages, but really, that has virtually no value
> > that I can see.
> >
> > So, if you know C++, you already basically know C#. However, there is a pretty
> > big .NET framework that you must learn in order to really understand the whole
> > ..NET thing.[/color]
>
> Yes, the framework is vast and is expanding, you can't learn everything
> one has to specialise. The XML section for example is a world of its
> own. The same applies for Web services, Encryption, Databases, GDI+,
> etc. You can only learn the basics and then specialise.
>
> But that has not anything to do with C#, itself, so why "C# will prevail
> and C++ will be used only for systems programming" is not clear to me.
> Actually it reminds me the VB 6 days, when I heard the same stuff, and
> never happened, and actually it was harder to make Windows GUI
> applications in C++ than VB (at least in VS, because there was BC++
> Builder), but in 1991, C++ was at 2.6 million programmers worldwide
> while VB was around 1 million (and Java was third).[/color]

I don' recall saying that C# will prevail.

I said that I feel that C++ is a systems programming language, and as far as I
know, the one of the best systems languages currently out there. C++ will
definitely lose market share to applications programming languages, regardless
of the specific language (Java, C#, VB, whatever), but as I tried to point out,
some of the market share that C++ enjoyed in previous years was due to a lack
of competition, and not because of suitability.
Ioannis Vranos
Guest
 
Posts: n/a
#36: Jul 22 '05

re: survival of c++


Julie wrote:
[color=blue]
> I said that I feel that C++ is a systems programming language, and as far as I
> know, the one of the best systems languages currently out there. C++ will
> definitely lose market share to applications programming languages, regardless
> of the specific language (Java, C#, VB, whatever),[/color]



So you imply that C++ is not suitable to be considered an applications
programming language. Can you provide any specific reasons for that?


[color=blue]
> but as I tried to point out,
> some of the market share that C++ enjoyed in previous years was due to a lack
> of competition, and not because of suitability.[/color]


Again, there always have been many programming languages available. For
the MS Windows 9x era, consider Delphi, VB, J++, Java (with many RADs
for it, like Borland's one) as "mainstream" ones and some others less
mainstream.






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Ioannis Vranos
Guest
 
Posts: n/a
#37: Jul 22 '05

re: survival of c++


jeffc wrote:
[color=blue]
> Just got done with one of those. The application is written on Windows for
> a proprietary OS production environment. The application runs fine on the
> Windows simulator. In production it crashes. Windows has a debugger (but
> we don't need a debugger there because it works fine.) The production OS
> does not have a debugger (where it is needed.) Took me 4 days to figure out
> that bad boy. Turns out it was a pointer that someone forgot to initialize
> to 0.[/color]

Eh? It was the pointer that was not initialised to 0, or that the code
assumed it was pointing to an object?






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Julie
Guest
 
Posts: n/a
#38: Jul 22 '05

re: survival of c++


Thomas Matthews wrote:[color=blue]
>
> Julie wrote:
>[color=green]
> > jimmy wrote:
> >[color=darkred]
> >>I am presently working in C++ .It is flexible and efficient.But it is
> >>not the reasons for the language to survive as hardware is running
> >>ahead the capabilities of software(why efficiency?).Java is a cool
> >>language and .NET too even for mobile devices and embedded
> >>systems.Anybody can give some valid reasons so that I can understaand
> >>C++ will survive in the coming years.[/color]
> >
> >
> > The first problem is that you can't really compare C++/C#/Java -- they all have
> > different intended audiences and capabilities.
> >
> > C++ is a systems programming language. It can be used as an applications
> > programming language.[/color]
>
> Hey Julie, what exactly is a "systems" language. Nice catch phrase.
> Is an operating system consider a "system". Is an application running
> on an embedded system a "system?". Can one have an application running
> in lisp on a System? Is C a systems language? Is FORTRAN?[/color]

Systems is my loose term for a language whose primary intended target is
low-level (systems level) programming. That doesn't imply that it is the
*only* thing that it can target, just its primary target.

If you look at a language and consider its standard libraries, it becomes
immediately clear what the intent of that language is.
[color=blue]
> Let us face the fact that C and C++ are languages. They have their own
> paradigms. If you want to use Pascal for your system then it is a
> system language.[/color]

No, I'm talking about the intended target of the language, not what an
individual user may do. Just about *any* language can be mangled enough to
just about anything, but that doesn't change its intent.
[color=blue]
> Let us not confine nor restrict programming languages.
> One can say that hardware is easier to access using C and C++ than
> using FORTRAN or Basic, but it can be done in those languages.[/color]

No one is talking about if it *CAN* be done, but if it *SHOULD* be done. Big
difference.
[color=blue][color=green]
> > C# is a single-platform applications programming language.[/color]
> Arrgghhhhhhh. C# is a language. If one wants to use it for multiple
> platforms, then so be it. If someone wants to write an operating
> system in it, so be it. So, what is the difference between an
> applications programming language and a systems one? I've heard
> COBOL is a systems language.[/color]

Again, I'm taking about the general tendency, not individual efforts.

Currently, C# (and especially .NET) is really only supported on one platform:
Windows. Sure, there are other efforts, but at this point, they are not much
more than pet or research projects. It will be many years when (or if) it
enjoys true cross-platform compatibility. Time and Microsoft will tell on that
one.
[color=blue][color=green]
> > Java is a multi-platform applications programming language.[/color]
> Arrrrgghhh, Uggggghhh. One nice benefit of Java is that it uses a
> "standardized" virtual machine to run on. It emits a "byte-code"
> language which will run on a virtual machine as long as the
> virtual machine adheres to the standard (Is there one???). The
> benefit is that if you can get a virtual machine for your platform,
> you can execute Java programs without having to recompile.[/color]

So what is your point of "arrgh" frustration? I said it is multi-platform, you
groan, and say it is multi-platform...???
[color=blue]
> The
> nice benefit of C and C++ is that if you have a compiler for them,
> {and the program is compliant to the standard), you can compile
> and execute them on another platform.[/color]

C++ is not a suitable language for writing cross-platform executables. Its
portiability is strictly limited by the availability of the necessary support
libaries (that interact w/ the underlying hardware and overlying user
interface). Even simple console-mode (character mode input/output) programs
are difficult to write/maintain, and really only target low-level users.
[color=blue]
> The nice benefit about
> FORTRAN is that it is a standard language. There are other
> languages which have emitted "byte-codes" before. They just
> didn't catch on.
>[color=green]
> > Historically, C++ has been used for just about everything. Before C# and Java,
> > there weren't a lot of widely available alternatives, so it was used a lot for
> > projects that would now be better suited w/ a more applications oriented
> > language.[/color]
> Yep, there weren't a lot of alternative languages before C# or Java.
> Hmmmm, let us pause a moment and reflect on our knowledge......
> .... yep, nothing like: FORTRAN, BASIC, SNOBOL, MODULA 2, Pascal, LISP,
> BASIC, Logo, Smalltalk, Prolog, Algol, Ada, PL/1, OPL, ZOPLZ, Assembly,
> COBOL, and more. Yep, not a lot of them. Hang on whilst I feed my
> aligator, change my banjo string and add more beers to the cooler.[/color]

Maybe you have a banjo string around your neck -- we are talking about
(general) applications level languages:

FORTRAN - target: mathematical and formula analysis
BASIC - target: teaching
MODULA/Pascal - target: teaching
LIST - target: list processing
BASIC - target: still teaching
Logo - target: teaching, limited robotic (turtle) control
COBOL - target: business logic
Prolog - target: AI
etc.

None of those are for GENERAL APPLICATIONS PROGRAMMING. Up until VB, Java, and
now C#, applications-level programming has been done using a language that is
primarily targeted elsewhere.

Apparently you aren't seeing the point that I was making:

C++ will lose market share to applications-level programming languages such as
Java and C#.
[color=blue][color=green]
> > Now that there are more choices, more informed project managers will be using
> > the most appropriate language, which will mean that what may have been written
> > in C++ previously will now (more appropriately) be written in C# or Java.
> > However, that doesn't mean that the use of C++ for its intended purpose will
> > diminish. With the exception of the ill-informed pm, C++ will continue to be
> > used for systems-level programming projects.[/color]
> "more informed project managers will be using the most appropriate
> language", now let me clean up the beer I just spit out on my keyboard.
> All of the project managers I worked for did not choose a language
> that would make implementation of a project easier. Nope, they choose
> the house language. Why? Probably because a lot of people know the
> language and the can hire experienced people using that language.
> There is a lot more at stake in producing a product (or finishing a
> project) than a minor decision about a programming language.
>
> The C++ language will live on as long as there are compiler vendors,
> and support tool producers still delivering their products. The
> same with C and Java. (I'm refrain from discussing C# as I have
> a weighted bias against Microsoft.) So, has FORTRAN, LISP or
> COBOL died? Nope, and they were among the first languages. So
> why should C or C++ die out anytime soon? Java may die out when
> Sun stops supporting it. Same with C# (but with M$).[/color]

I never said that C++ will die. It will lose market share.
Ioannis Vranos
Guest
 
Posts: n/a
#39: Jul 22 '05

re: survival of c++


Julie wrote:
[color=blue]
> Systems is my loose term for a language whose primary intended target is
> low-level (systems level) programming. That doesn't imply that it is the
> *only* thing that it can target, just its primary target.
>
> If you look at a language and consider its standard libraries, it becomes
> immediately clear what the intent of that language is.[/color]


C++ is a general purpose programming language and supports 4 paradigms.
Each paradigm is supported well with optimal space and time
efficiencies. That implies that it is also suitable both for low level
programming and application programming and does not lack anything your
other "application languages" have.


What has C#, VB or whatever that makes it better than C++ for
application programming?

[color=blue]
> No, I'm talking about the intended target of the language, not what an
> individual user may do. Just about *any* language can be mangled enough to
> just about anything, but that doesn't change its intent.[/color]



The intended target of C++ is general purpose programming. That includes
application programming.



[color=blue]
> Again, I'm taking about the general tendency, not individual efforts.
>
> Currently, C# (and especially .NET) is really only supported on one platform:
> Windows. Sure, there are other efforts, but at this point, they are not much
> more than pet or research projects. It will be many years when (or if) it
> enjoys true cross-platform compatibility. Time and Microsoft will tell on that
> one.[/color]



Although I do not care for C# in special, check this:

http://www.mono-project.com




[color=blue]
> C++ is not a suitable language for writing cross-platform executables. Its
> portiability is strictly limited by the availability of the necessary support
> libaries (that interact w/ the underlying hardware and overlying user
> interface). Even simple console-mode (character mode input/output) programs
> are difficult to write/maintain, and really only target low-level users.[/color]



C++ so far is suitable for compilation portability. However all the
application languages you are talking about (VB and C#), do not provide
even that.


[color=blue]
> Maybe you have a banjo string around your neck -- we are talking about
> (general) applications level languages:
>
> FORTRAN - target: mathematical and formula analysis[/color]


Mainly.


[color=blue]
> BASIC - target: teaching[/color]


Not application programming? :-)


[color=blue]
> MODULA/Pascal - target: teaching[/color]



Not only of course. Pascal has been used extensively for application
programming (a mainstream language) and Modula was created for serious
application programming as its creator has said.



[color=blue]
> LIST - target: list processing
> BASIC - target: still teaching[/color]


See above.

[color=blue]
> Logo - target: teaching, limited robotic (turtle) control[/color]


Ehehe.

[color=blue]
> COBOL - target: business logic
> Prolog - target: AI
> etc.
>
> None of those are for GENERAL APPLICATIONS PROGRAMMING. Up until VB, Java, and
> now C#, applications-level programming has been done using a language that is
> primarily targeted elsewhere.[/color]



VB, Java, and Pascal (including Delphi) have been around for many years
and with RADs, however they never surpassed C++. That's a statistical
observation.


[color=blue]
> Apparently you aren't seeing the point that I was making:
>
> C++ will lose market share to applications-level programming languages such as
> Java and C#.[/color]



One can always dream. :-)






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Julie
Guest
 
Posts: n/a
#40: Jul 22 '05

re: survival of c++


Ioannis Vranos wrote:[color=blue]
>
> Julie wrote:
>[color=green]
> > I said that I feel that C++ is a systems programming language, and as far as I
> > know, the one of the best systems languages currently out there. C++ will
> > definitely lose market share to applications programming languages, regardless
> > of the specific language (Java, C#, VB, whatever),[/color]
>
> So you imply that C++ is not suitable to be considered an applications
> programming language. Can you provide any specific reasons for that?[/color]

Look at the standard libraries supplied w/ the language.

I don't see anything in the C/C++ libraries that support applications-level
programming.
[color=blue][color=green]
> > but as I tried to point out,
> > some of the market share that C++ enjoyed in previous years was due to a lack
> > of competition, and not because of suitability.[/color]
>
> Again, there always have been many programming languages available. For
> the MS Windows 9x era, consider Delphi, VB, J++, Java (with many RADs
> for it, like Borland's one) as "mainstream" ones and some others less
> mainstream.[/color]

Right. And if you recall (if you were around, research it if you weren't),
Java was the first language to be specifically marketed to a broad audience,
*including* un/ill-informed management and above. A lot of the early decisions
to use Java (and hence, increase its perceived market share) was due to
misinformation and upper-management edicts that felt that Java == $$.

All of those other languages that you describe are definitely applications
level, but they have never enjoyed the marketing machinery that Java has.
Phlip
Guest
 
Posts: n/a
#41: Jul 22 '05

re: survival of c++


Gianni Mariani wrote:
[color=blue]
> Anonymous wrote:[/color]
[color=blue][color=green]
> > ...if it cant match with new features of C++ like
> > extended support for generic programming in c++ will be standard part of[/color][/color]
C++[color=blue][color=green]
> > shortly.[/color]
>
> Which feature are you referring to ?[/color]

The feature where C++ doesn't treat classes as objects, and hence must
piggyback an entire system, templates, just to give them object-like
expressiveness in a few narrow situations.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces


Ioannis Vranos
Guest
 
Posts: n/a
#42: Jul 22 '05

re: survival of c++


Julie wrote:

[color=blue]
> Look at the standard libraries supplied w/ the language.
>
> I don't see anything in the C/C++ libraries that support applications-level
> programming.[/color]


string, vector, rand(), time() etc.

Does your own favourite application programming language have any
standard library of its own?


[color=blue]
> Right. And if you recall (if you were around, research it if you weren't),
> Java was the first language to be specifically marketed to a broad audience,
> *including* un/ill-informed management and above.[/color]



Ehehe, and I was starting to suspect that Java was behind this. That
means we can't reach any reasonable conclusion in this discussion.


References:


Check "Java" references: http://www.stlport.org/resources/StepanovUSA.html


Check "silver bullet" references:
http://www.stlport.org/resources/StepanovUSA.html


Check "Java":
http://www.biltek.ieee.metu.edu.tr/s...01/bs_eng.html




[color=blue]
> A lot of the early decisions
> to use Java (and hence, increase its perceived market share) was due to
> misinformation and upper-management edicts that felt that Java == $$.
>
> All of those other languages that you describe are definitely applications
> level, but they have never enjoyed the marketing machinery that Java has.[/color]



And? C++ lacking any commercial backing, yet succeeded to be the first.






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Ioannis Vranos
Guest
 
Posts: n/a
#43: Jul 22 '05

re: survival of c++


Ioannis Vranos wrote:

[color=blue]
> References:
>
>
> Check "Java" references: http://www.stlport.org/resources/StepanovUSA.html
>
>
> Check "silver bullet" references:[/color]

http://www.itworld.com/AppDev/710/lw...up/page_1.html


[color=blue]
> Check "Java":
> http://www.biltek.ieee.metu.edu.tr/s...01/bs_eng.html[/color]






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
beliavsky@aol.com
Guest
 
Posts: n/a
#44: Jul 22 '05

re: survival of c++


jimmyvarghesemca@hotmail.com (jimmy) wrote in message news:<355b7859.0407110057.297f90e4@posting.google. com>...[color=blue]
> I am presently working in C++ .It is flexible and efficient.But it is
> not the reasons for the language to survive as hardware is running
> ahead the capabilities of software(why efficiency?).Java is a cool
> language and .NET too even for mobile devices and embedded
> systems.Anybody can give some valid reasons so that I can understaand
> C++ will survive in the coming years.[/color]

Ask someone in (for example) numerical weather prediction if he still
has a need for efficiency.

In "scientific computing", one tries to learn about the physical world
using a mathematical model -- an approximation of reality. A
computational scientist will almost always be able to get better
results, or more results, with more computational power.

For example, many calculations that scientists and engineers involve
the solution of partial differential equations (PDE). You can increase
the quality of a PDE solution by using more grid points, but that
increases the computation time.

Another field where computational demands are inexhaustible is "data
mining". There are infinitely many statistical models that can be fit
to a certain data set, and the data sets themselves are getting bigger
as memory gets cheaper.

C, C++, and Fortran are still important languages for scientific
computing, because speed still matters. Scripting languages such as
Python have a place, but are best used in conjunction with languages
like C and Fortran.
red floyd
Guest
 
Posts: n/a
#45: Jul 22 '05

re: survival of c++


jeffc wrote:[color=blue]
> "Phlip" <phlip_cpp@yahoo.com> wrote in message
> news:brhIc.226$4L7.83@newssvr33.news.prodigy.com.. .
>[color=green][color=darkred]
>>>Am I the only person in the universe that hasn't had problems with[/color][/color]
>
> "stray
>[color=green][color=darkred]
>>>pointers"? I feel I must be missing something here, because it seems oh[/color][/color]
>
> so
>[color=green][color=darkred]
>>>simple.[/color]
>>[color=darkred]
>>>-JKop[/color]
>>
>>Someday, JKop may get to maintain legacy code not written by someone as
>>non-stupid as JKop. Then JKop will appreciate learning the smell and the
>>feel of various kinds of mystery crashes. Oh, this one feels like an array
>>overrun. Oh, that one feels like a double delete.[/color]
>
>
> Just got done with one of those. The application is written on Windows for
> a proprietary OS production environment. The application runs fine on the
> Windows simulator. In production it crashes. Windows has a debugger (but
> we don't need a debugger there because it works fine.) The production OS
> does not have a debugger (where it is needed.) Took me 4 days to figure out
> that bad boy. Turns out it was a pointer that someone forgot to initialize
> to 0.
>
>[/color]

Know the feeling. Once had to debug an error that was reporting itself
as "this should never occur". Turns out it was a third order effect,
i.e. A corrupts B, corrupted B corrupts C, corrupted C causes the error
to be reported. This was on an embedded system with no memory
protection (Z8000). It also occurred 8 hours into a full bore system
interop test (requiring the services of 14 system operators). We
finally wound up jimmying a hardware ICE into the system in question,
tape recording (on analog audio tape) all (1200/2100Hz analog FSK)
communications, and playing them back. Not fun.

Turns out it was indexing an array by -1. (unchecked return code from
call) Yecch.
jimmy
Guest
 
Posts: n/a
#46: Jul 22 '05

re: survival of c++


>[color=blue]
> Please, Please, Please, read the newsgroup articles
> before worrying about C++ efficiency or life time.[/color]

I didnt mean to start a flame war Thomas,Ive already saw the FAQ,but
was not happy with it.I was expecting real time advice from
programmers.Anyhow,I havent browsed through the pages of the group for
getting this topic discussion.I am sorry if this is actually
discussed,I am quiet new to the group.
Richard Herring
Guest
 
Posts: n/a
#47: Jul 22 '05

re: survival of c++


In message <40F2C678.258D4896@nospam.com>, Julie <julie@nospam.com>
writes[color=blue]
>Thomas Matthews wrote:[color=green]
>> Julie wrote:[/color][/color]
[color=blue][color=green][color=darkred]
>> > Historically, C++ has been used for just about everything. Before
>> >and Java,
>> > there weren't a lot of widely available alternatives, so it was
>> >used a lot for
>> > projects that would now be better suited w/ a more applications oriented
>> > language.[/color]
>> Yep, there weren't a lot of alternative languages before C# or Java.
>> Hmmmm, let us pause a moment and reflect on our knowledge......
>> .... yep, nothing like: FORTRAN, BASIC, SNOBOL, MODULA 2, Pascal, LISP,
>> BASIC, Logo, Smalltalk, Prolog, Algol, Ada, PL/1, OPL, ZOPLZ, Assembly,
>> COBOL, and more. Yep, not a lot of them. Hang on whilst I feed my
>> aligator, change my banjo string and add more beers to the cooler.[/color]
>
>Maybe you have a banjo string around your neck -- we are talking about
>(general) applications level languages:
>
>FORTRAN - target: mathematical and formula analysis
>BASIC - target: teaching
>MODULA/Pascal - target: teaching
>LIST[/color]
LISP?[color=blue]
>- target: list processing[/color]

whatever that is.

How about AI and applications programming (never heard of EMACS?
REDUCE?)

--
Richard Herring
Robbie Hatley
Guest
 
Posts: n/a
#48: Jul 22 '05

re: survival of c++


Mr. John "Anonymous" Doe wrote:
[color=blue]
> ... When people talk about C/C++ it is a bridge between
> low level language and a high level language....[/color]

It's really a mistake to speak of C/C++. They are two
languages.

I use both at work: C for firmware, C++ for Windows-based
development.

C is great for firmware because it requires very little
run-time startup code, and C compilers are widely
available for microprocessors, whereas C++ compilers
are not. Not to mention, C is "closer to the machine",
which is important when you are counting every byte on a
execution processor with a total RAM space of 512 bytes.
No, not 512 megabytes, not 512 kilobytes... 512 BYTES.
Usage of fixed-size built-in arrays instead of fancy
containers, macros instead of functions (to avoid stack
use), and very tight code is essential on a machine like
that. C will survive for decades (or centuries) to come;
count on it.

C++, on the other hand, is great for apps to be run on
execution machines with fast processors and large
RAMs. Std. containers, std. algorithms, class hierarchies,
etc. -- I use them all. In a large program to be run on
a powerful machine, the problem isn't trying to save
resources, the problem is how to tame vast reams of
source code. I'm currently doing maintainance on a
legacy C program in excess of 650,000 lines, slowly
converting it to C++, pruning dross, simplifying,
down-sizing. Dude who wrote it should have wrote it in
C++; but he didn't, and then he got fired; so now I
(and two coworkers) have to clean up the mess, and
I'm finding conversion to C++ is key in this. C++,
too, will survive, grow, mutate, for decades to come,
I have no doubt of it.
[color=blue]
> ... There is no argument that java/c# will kill
> c/c++ ...[/color]

Java mostly runs on virtual machines. Interpreted,
basically. Very, very slow. I've not toyed with
programs compiled from Java to native machine language;
perhaps they're faster. But I suspect still not as
fast as C++.

C# is Microsoft-specific. It'll probably be obsolete
in a few short years, replaced by the latest MS fad.

C and C++ will survive because they're ubiquitous and
non-platform-specific. You can run them on just about
everything from the 8-bit controller chip in your
microwave oven, to a Cray supercomputer. You can't
say that about too many languages.


--
Cheers,
Robbie Hatley
Tustin, CA, USA
email: lonewolfintj at pacbell dot net
web: home dot pacbell dot net slant earnur slant




jimmy
Guest
 
Posts: n/a
#49: Jul 22 '05

re: survival of c++


> > ... When people talk about C/C++ it is a bridge between[color=blue][color=green]
> > low level language and a high level language....[/color]
>
> It's really a mistake to speak of C/C++. They are two
> languages.
>
> I use both at work: C for firmware, C++ for Windows-based
> development.
>
> C is great for firmware because it requires very little
> run-time startup code, and C compilers are widely
> available for microprocessors, whereas C++ compilers
> are not. Not to mention, C is "closer to the machine",
> which is important when you are counting every byte on a
> execution processor with a total RAM space of 512 bytes.
> No, not 512 megabytes, not 512 kilobytes... 512 BYTES.
> Usage of fixed-size built-in arrays instead of fancy
> containers, macros instead of functions (to avoid stack
> use), and very tight code is essential on a machine like
> that. C will survive for decades (or centuries) to come;
> count on it.
>
> C++, on the other hand, is great for apps to be run on
> execution machines with fast processors and large
> RAMs. Std. containers, std. algorithms, class hierarchies,
> etc. -- I use them all. In a large program to be run on
> a powerful machine, the problem isn't trying to save
> resources, the problem is how to tame vast reams of
> source code. I'm currently doing maintainance on a
> legacy C program in excess of 650,000 lines, slowly
> converting it to C++, pruning dross, simplifying,
> down-sizing. Dude who wrote it should have wrote it in
> C++; but he didn't, and then he got fired; so now I
> (and two coworkers) have to clean up the mess, and
> I'm finding conversion to C++ is key in this. C++,
> too, will survive, grow, mutate, for decades to come,
> I have no doubt of it.
>[color=green]
> > ... There is no argument that java/c# will kill
> > c/c++ ...[/color]
>
> Java mostly runs on virtual machines. Interpreted,
> basically. Very, very slow. I've not toyed with
> programs compiled from Java to native machine language;
> perhaps they're faster. But I suspect still not as
> fast as C++.
>
> C# is Microsoft-specific. It'll probably be obsolete
> in a few short years, replaced by the latest MS fad.
>
> C and C++ will survive because they're ubiquitous and
> non-platform-specific. You can run them on just about
> everything from the 8-bit controller chip in your
> microwave oven, to a Cray supercomputer. You can't
> say that about too many languages.[/color]



Thanks John,I understood
The productivity gains of other languages may be there.But C++ is a versatile
language and it will stay.
Thanks everybody
tom_usenet
Guest
 
Posts: n/a
#50: Jul 22 '05

re: survival of c++


On Mon, 12 Jul 2004 18:46:44 GMT, "Phlip" <phlip_cpp@yahoo.com> wrote:
[color=blue]
>Gianni Mariani wrote:
>[color=green]
>> Anonymous wrote:[/color]
>[color=green][color=darkred]
>> > ...if it cant match with new features of C++ like
>> > extended support for generic programming in c++ will be standard part of[/color][/color]
>C++[color=green][color=darkred]
>> > shortly.[/color]
>>
>> Which feature are you referring to ?[/color]
>
>The feature where C++ doesn't treat classes as objects, and hence must
>piggyback an entire system, templates, just to give them object-like
>expressiveness in a few narrow situations.[/color]

By "treat classes as objects" are you talking about RTTI? What has
that got to do with generic programming? They are orthogonal features,
and some languages presumably have both (Dylan?).

Tom
Closed Thread