future of C++

P

Phlip

Ioannis said:
An example in .NET is

int x;

String *p= x.ToString();

That is a related topic: "Everything is an object, so you can extend even
systemic primitives like integers. You can inherit the int class and even
add new methods to the global int class."
What is the benefit of having classes being objects? May you provide an example?
Are you talking about RTTI?

(getting a touch of deja-vu here...)

I mean the Prototype Pattern is built-into languages where classes are
objects.

def foo(klass)
objekt = klass.new()
...
end

That's it. Foo() can build and use an object of any type you pass in
(including Foo(int)), so long as objekt obeys whatever interface the
ellipses ... demand from it.

When refactoring to merge duplication, this technique can allow a lot to
vanish into abstracted constructors. Confer: Construction Encapsulation.

When refactoring to merge such duplication in C++, you have the odious and
expensive choice of a template, which afflicts all your downstream code.
Hence, libraries like Boost must make everything a template of a template of
a template. Yes, it's efficient, but that's only because the 'template'
keyword was retrofitted into existing compiler technology.
 
I

Ioannis Vranos

Phlip said:
That is a related topic: "Everything is an object, so you can extend even
systemic primitives like integers. You can inherit the int class and even
add new methods to the global int class."


Yes, in CLI (.NET), CLI types map directly to the language types. CLI types *are* structs.


Here is about int (System::Int32):

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemint32memberstopic.asp


So C++ can have these (and has whatever a platform provides), however I think the ISO C++
standard does not provide these because it aims to be also a systems programming language
(space/run-time efficiency).


In a C++ implementation for Ruby's platform (interpreter), C++ will also have them. :)
 
G

Gregory L. Hansen

Actually, I was NOT asking the question in a troll's way...

The company I work for is , not surprisingly, Java based, with some
C#, and very very small (and to an extend trivial) C++.

To me C++ is more of a hobby language - yet I always wanted to work
with C++ professionally. And I was sincerely curious if it is
worthwhile endeavor to still invest my time into it.....

www.careerbuilder.com, keyword C++, 1320 hits.

Compared with 6971 hits for "Java", but what the heck.
 
B

Bob Hairgrove

Certainly, neither Java or C# can replace C++.
You can't write practical operating systems, device drivers
or real-time application programs in either Java or C#.

IIRC, Linus Torvalds said they tried to do (some of?) the Linux kernel
in C++ once, but it was just "too painful".

That was probably back in the beginnings of the language, though. I
wonder how he would fare today with C++?
 
J

Johan Jooris

I can imagine that C++ will remain to have its place in this kind of
applications.

But what is the future of unmanaged C++ for 'normal' applications (e.g.
distributed database applications, xml webservice applications)
Can't C# be used for real time applications (statefull windows services with
persistor functionalities) at all ?
What is your and the pro's opiniion about this ?

Thanks !
 
B

Bob Hairgrove

I can imagine that C++ will remain to have its place in this kind of
applications.

But what is the future of unmanaged C++ for 'normal' applications (e.g.
distributed database applications, xml webservice applications)

There are many good database access and XML libraries for C++ out
there, so C++ should continue to be a viable language for writing such
applications.
Can't C# be used for real time applications (statefull windows services with
persistor functionalities) at all ?
What is your and the pro's opiniion about this ?

C# doesn't run on any operating system except Windows AFAIK, and
Windows is not a real-time operating system.
 

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

Similar Threads

C and the future of computing 0
Future of C++ 79
Future of c++ 29
The future of C++ 47
The Future of C++ ? 190
What is the future of C++? 35
The Future of Python Threading 34
C++... is it dying? 70

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top