C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The future of c++

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
cafegee
Guest





PostPosted: Thu Apr 28, 2005 4:56 am    Post subject: The future of c++ Reply with quote



As far as I concern, there is no reason that we should pattern the
future of c++ language on the current Java or c#. Why should we have
to so? c++ language has it's own specialty,it is a effiecent,flexible
language,Why should it be developed to a cross-platform language,like
Java?
Back to top
Phlip
Guest





PostPosted: Thu Apr 28, 2005 5:47 am    Post subject: Re: The future of c++ Reply with quote



Ioannis Vranos wrote:

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


Does that let you _inherit_ from 'int', _within_ the target language? I'm
not talking about some reflection trick, or stepping outside the language.

cafegee wrote:

Quote:
As far as I concern, there is no reason that we should pattern the
future of c++ language on the current Java or c#. Why should we have
to so? c++ language has it's own specialty,it is a effiecent,flexible
language,Why should it be developed to a cross-platform language,like
Java?

Allow me to be the first for you:

D Programming Language Compiled, garbage collected, simpler C/C++
replacement by Walter Bright (wrote first DOS C++ compiler). Maximum
similarity to C/C++, except where backward ...
www.digitalmars.com/d/


No, I haven't used it. It probably blows Ruby away, too. Maybe I'l start a
learner project tomorrow. I wonder how it tests-first.

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand



Back to top
Ioannis Vranos
Guest





PostPosted: Thu Apr 28, 2005 6:34 am    Post subject: Re: The future of c++ Reply with quote



Phlip wrote:

Quote:
Does that let you _inherit_ from 'int', _within_ the target language? I'm
not talking about some reflection trick, or stepping outside the language.


temp.cpp(4) : error C3246: 'MyType' : cannot inherit from 'System::Int32' as it
has been declared as '__sealed'
temp.cpp(1) : see declaration of 'System::Int32'


The types themselves are sealed structs. However one can always do:


#using <mscorlib.dll>


__value struct MyType
{
int x;

public:
MyType(int val)Mad(val) {}

System::String *ToString() { return "Some other answer"; }

// .NET types have operator definitions as static member functions
static const MyType op_Assign (MyType &m, int &val)
{
m.x= val;
return m;
}
};


int main()
{
using namespace System;

int x= 4;

MyType y= x;

Console::WriteLine(x.ToString());

Console::WriteLine(y.ToString());
}


C:c>temp
4
Some other answer

C:c>



--
Ioannis Vranos

http://www23.brinkster.com/noicys

Back to top
Ioannis Vranos
Guest





PostPosted: Thu Apr 28, 2005 6:41 am    Post subject: Re: The future of c++ Reply with quote

Fixed:


Ioannis Vranos wrote:

Quote:
temp.cpp(4) : error C3246: 'MyType' : cannot inherit from
'System::Int32' as it
has been declared as '__sealed'
temp.cpp(1) : see declaration of 'System::Int32'


The types themselves are sealed structs. However one can always do:


#using <mscorlib.dll


__value class MyType
Quote:
{
int x;

public:
MyType(int val)Mad(val) {}

System::String *ToString() { return "Some other answer"; }

// .NET types have operator definitions as static member functions
static const MyType op_Assign (MyType &m, int &val)
{
m.x= val;
return m;
}
};


int main()
{
using namespace System;

int x= 4;

MyType y= x;

Console::WriteLine(x.ToString());

Console::WriteLine(y.ToString());
}


C:c>temp
4
Some other answer

C:c



--
Ioannis Vranos

http://www23.brinkster.com/noicys

Back to top
Phlip
Guest





PostPosted: Thu Apr 28, 2005 2:01 pm    Post subject: Re: The future of c++ Reply with quote

Ioannis Vranos wrote:

Quote:
The types themselves are sealed structs. However one can always do:

#using

I have never found a reason to extend the 'int' type. But I would generally
prefer a language have a greater capacity for elegance. That lowers the cost
of the various techniques which can do more with less.

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand





Back to top
belief
Guest





PostPosted: Sun May 08, 2005 4:26 am    Post subject: Re: The future of c++ Reply with quote

I agree. It's not problem what Vranos said.
in now C++, we can give a class wraped the basic type without more efficency
than Java or C#.
Bjarne Stroustrup also give a method to prevent a class from being
inherited, though it is not easy as a keyword "final" like java and "sealed"
like C#.

Stroustrup.B says the next version of C++ Standard will strenghten the
constraint of the template argument.ie.type checking about template
argument. Maybe this is the neccesary point about C++ 's future.^_^

"cafegee" <cafegee (AT) hotmail (DOT) com> ????
news:75d6161.0504272056.8f3a393 (AT) posting (DOT) google.com...
Quote:
As far as I concern, there is no reason that we should pattern the
future of c++ language on the current Java or c#. Why should we have
to so? c++ language has it's own specialty,it is a effiecent,flexible
language,Why should it be developed to a cross-platform language,like
Java?



Back to top
Ioannis Vranos
Guest





PostPosted: Sun May 08, 2005 7:54 am    Post subject: Re: The future of c++ Reply with quote

belief wrote:

Quote:
I agree. It's not problem what Vranos said.
in now C++, we can give a class wraped the basic type without more efficency
than Java or C#.


I am not sure what you mean. C++ native code is naturally faster than managed code of Java
and .NET.


C++ managed code is more efficient than any other language of .NET including VC#. In VS
2005, C++ is the systems programming language of .NET. So C++ is the most efficient in
both worlds.



Some references:

http://msdn.microsoft.com/msdnmag/issues/05/01/COptimizations/default.aspx

http://pluralsight.com/blogs/hsutter/archive/2004/10/05/2672.aspx

http://blogs.msdn.com/branbray/archive/2003/11/07/51007.aspx

http://www.accu.org/conference/presentations/Sutter_-_Is_C++_Relevant_on_Modern_Environments_%28keynote%29.pdf


And a page of mine:

http://www23.brinkster.com/noicys/cppcli.htm


Quote:
Bjarne Stroustrup also give a method to prevent a class from being
inherited, though it is not easy as a keyword "final" like java and "sealed"
like C#.


In .NET managed classes, C++ has also the keyword sealed. Under .NET it is not a feature
of some language, it is a feature and requirement of .NET. And C++ being the systems
programming language of it, couldn't miss it, while C# misses some low level .NET features
that C++ provides (you may check the 3rd link of the above).



--
Ioannis Vranos

http://www23.brinkster.com/noicys

Back to top
Wisdo Tang
Guest





PostPosted: Tue May 10, 2005 1:01 am    Post subject: Re: The future of c++ Reply with quote

Hi, Vranos.

Of course, what you said is right.
factly, I just want to give the expression that the Standard C++ should
never change
as the cross-platform language like Java because of enough facilities.
ie.the existance of the C# or another similar language is necessary for
rapid enterprise-developing,
but not for the C++ Standard.
that 's all ^_^

thanks for your respone and detail references.

regards.
wisdo (belief)


"Ioannis Vranos" <ivr (AT) grad (DOT) com> ???? news:1115538877.282217 (AT) athnrd02 (DOT) ..
Quote:
belief wrote:

I agree. It's not problem what Vranos said.
in now C++, we can give a class wraped the basic type without more
efficency
than Java or C#.


I am not sure what you mean. C++ native code is naturally faster than
managed code of Java
and .NET.


C++ managed code is more efficient than any other language of .NET
including VC#. In VS
2005, C++ is the systems programming language of .NET. So C++ is the most
efficient in
both worlds.



Some references:

http://msdn.microsoft.com/msdnmag/issues/05/01/COptimizations/default.aspx

http://pluralsight.com/blogs/hsutter/archive/2004/10/05/2672.aspx

http://blogs.msdn.com/branbray/archive/2003/11/07/51007.aspx


http://www.accu.org/conference/presentations/Sutter_-_Is_C++_Relevant_on_Modern_Environments_%28keynote%29.pdf


And a page of mine:

http://www23.brinkster.com/noicys/cppcli.htm


Bjarne Stroustrup also give a method to prevent a class from being
inherited, though it is not easy as a keyword "final" like java and
"sealed"
like C#.


In .NET managed classes, C++ has also the keyword sealed. Under .NET it is
not a feature
of some language, it is a feature and requirement of .NET. And C++ being
the systems
programming language of it, couldn't miss it, while C# misses some low
level .NET features
that C++ provides (you may check the 3rd link of the above).



--
Ioannis Vranos

http://www23.brinkster.com/noicys



Back to top
Ioannis Vranos
Guest





PostPosted: Tue May 10, 2005 9:22 am    Post subject: Re: The future of c++ Reply with quote

Wisdo Tang wrote:

Quote:
Hi, Vranos.

Of course, what you said is right.
factly, I just want to give the expression that the Standard C++ should
never change
as the cross-platform language like Java because of enough facilities.


And again, C++ and "Java" are two different things. "Java" is not a language, it is a
language coming together with a platform.


Quote:
ie.the existance of the C# or another similar language is necessary for
rapid enterprise-developing,
but not for the C++ Standard.


Similarly many (most?) C# programmers confuse the .NET framework facilities with C#/CLI
itself. They think for example that the .NET facilities like Form class, TextBox,
TcpClient, etc are part of C# while they are not. I assume that many VB .NET developers
have similar confusion.

In any case returning to Java-syntax/JVM, if we were to compare C++ with it, we should
also pick a VM platform like .NET and then move to compare each. For example, C++ vs
Java-syntax (which is far more reduced than you think about what consists its syntax) and
then .NET vs JVM.



--
Ioannis Vranos

http://www23.brinkster.com/noicys

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.