 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Randall Parker Guest
|
Posted: Thu Nov 06, 2003 11:19 pm Post subject: What C++ syntax breaks on DOT NET Managed C++? |
|
|
So what does MS not support from C++ in Managed C++?
Is it true that they do not support templates?
|
|
| Back to top |
|
 |
Harold Howe [TeamB] Guest
|
Posted: Thu Nov 06, 2003 11:31 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
Randall Parker wrote:
| Quote: | So what does MS not support from C++ in Managed C++?
Is it true that they do not support templates?
|
Yes, you can use template class and functions from within managed code.
However, you cannot create a managed template class and expect to be
able to export that for other languages, such as C3 and VB.
h^2
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Nov 06, 2003 11:42 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
"Harold Howe [TeamB]" <hhowe (AT) bcbdev (DOT) com> wrote
| Quote: | Yes, you can use template class and functions from within managed code.
|
Are you sure about that? One of the speakers addressed a similar question
and said that Managed code didn't have templated.
Gambit
|
|
| Back to top |
|
 |
Edward Diener Guest
|
Posted: Thu Nov 06, 2003 11:45 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
Harold Howe [TeamB] wrote:
| Quote: | Randall Parker wrote:
So what does MS not support from C++ in Managed C++?
Is it true that they do not support templates?
Yes, you can use template class and functions from within managed
code. However, you cannot create a managed template class and expect
to be able to export that for other languages, such as C3 and VB.
|
I am pretty sure you are wrong Harold. MS is adding their own version of
templates to C#, and therefore probably managed C++, but it is different
from C++ templates and it is called Generics.
|
|
| Back to top |
|
 |
Harold Howe [TeamB] Guest
|
Posted: Thu Nov 06, 2003 11:54 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
Remy Lebeau (TeamB) wrote:
| Quote: | Are you sure about that? One of the speakers addressed a similar question
and said that Managed code didn't have templated.
|
I don't know. JT told me about some of Herb Sutter's articles where he
explains how they need to fix managed C++. I thought he said that using
containers and STL templates from managed C++ would be possible, but
maybe I was spacing off.
I am assuming that Borland is going to focus on fixed, 'Herb Sutter'
managed c++, and not the bastardized version of managed C++ as it exists
today.
H^2
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Nov 06, 2003 11:54 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote
| Quote: | Are you sure about that? One of the speakers addressed
a similar question and said that Managed code didn't have templated.
|
I just saw this at MSDN:
"The .NET platform doesn't support generic programming yet, but managed
C++ programmers can still take advantage of the template mechanisms
available in normal C++ to a certain extent. Of course, this means you can
only use them as internal aids to your managed C++ implementation and cannot
expose them to other .NET languages, but they are still useful for a few
tricks."
Gambit
|
|
| Back to top |
|
 |
G.B.R. Guest
|
Posted: Thu Nov 06, 2003 11:56 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote
| Quote: |
"Harold Howe [TeamB]" <hhowe (AT) bcbdev (DOT) com> wrote in message
news:3faad97c (AT) newsgroups (DOT) borland.com...
Yes, you can use template class and functions from within managed code.
Are you sure about that? One of the speakers addressed a similar question
and said that Managed code didn't have templated.
|
You cannot have managed class templates, but you can mix managed and
unmanaged code in a single source. You can instantiate unmanaged templates
in managed classes, and v.v. As to the managed classes there are lots of
limitations intended to make them uniform in all .net languages.
|
|
| Back to top |
|
 |
Edward Diener Guest
|
Posted: Fri Nov 07, 2003 12:08 am Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
G.B.R. wrote:
| Quote: | "Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote in
message news:3faadb98$1 (AT) newsgroups (DOT) borland.com...
"Harold Howe [TeamB]" <hhowe (AT) bcbdev (DOT) com> wrote in message
news:3faad97c (AT) newsgroups (DOT) borland.com...
Yes, you can use template class and functions from within managed
code.
Are you sure about that? One of the speakers addressed a similar
question and said that Managed code didn't have templated.
You cannot have managed class templates, but you can mix managed and
unmanaged code in a single source. You can instantiate unmanaged
templates in managed classes, and v.v.
|
Good to know. Thanks ! That means one can use instantiated STL containers
and smart pointers in a single source which is part of an assembly. I did
realize that instantiated templates can not be part of a CLR interface, but
I didn't think one could use instantiated templates except in non-managed
code modules. I am glad I am wrong.
|
|
| Back to top |
|
 |
Randall Parker Guest
|
Posted: Sat Nov 08, 2003 6:51 am Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
Maybe the reason MS is lagging on template support is that they don't
allow some operations in managed C++ that template code routinely does.
I can't imagine their C++ compiler front-end for managed C++ is
incapable of parsing the template code.
Edward Diener wrote:
| Quote: | I am pretty sure you are wrong Harold. MS is adding their own version of
templates to C#, and therefore probably managed C++, but it is different
from C++ templates and it is called Generics.
|
|
|
| Back to top |
|
 |
G.B.R. Guest
|
Posted: Sat Nov 08, 2003 5:43 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
"Randall Parker" <STOPtechiepundit (AT) EVILfuturePOXpunditSPAM (DOT) com> wrote in
message news:3fac929c$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Maybe the reason MS is lagging on template support is that they don't
allow some operations in managed C++ that template code routinely does.
I can't imagine their C++ compiler front-end for managed C++ is
incapable of parsing the template code.
|
There is, of course, no problem with parsing or compiling template code.
Latest VC compiler is quite capable of compiling the most convoluted
templates. The real problem, or better say two problems are related to .net
itself. There is no way of compiling templates to MSIL to be supported by
CLR. Even exported templates are not supported by a majority of compilers,
which is a simpler task. Problem number two is that the other languages in
..net do not have similar concept and it cannot be simply introduced there,
because all other c++ rules regarding overloading, lookup, etc., all the
complexities of c++ would need to be dragged into the other languages. The
end result of such metamorphosis would be several c++ languages, each with
its own syntax That's why they are working on a generic solution that
would circumvent those two problems, which I believe will be rather weak
taking into account those constraints.
|
|
| Back to top |
|
 |
G.B.R. Guest
|
|
| Back to top |
|
 |
Marcelo R. Lopez, Jr. Guest
|
Posted: Mon Nov 10, 2003 4:41 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
Clap..Clap...Clap...
Excellent ! Just when I thought .NET had swallowed one more programmer, a
voice of reason
comes out.
| Quote: |
There is, of course, no problem with parsing or compiling template code.
Latest VC compiler is quite capable of compiling the most convoluted
templates. The real problem, or better say two problems are related to
..net
itself. There is no way of compiling templates to MSIL to be supported by
CLR. Even exported templates are not supported by a majority of compilers,
which is a simpler task. Problem number two is that the other languages in
.net do not have similar concept and it cannot be simply introduced there,
because all other c++ rules regarding overloading, lookup, etc., all the
complexities of c++ would need to be dragged into the other languages. The
end result of such metamorphosis would be several c++ languages, each with
its own syntax That's why they are working on a generic solution that
would circumvent those two problems, which I believe will be rather weak
taking into account those constraints.
|
|
|
| Back to top |
|
 |
Randall Parker Guest
|
Posted: Mon Nov 10, 2003 9:10 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
So Microsoft is making a new development environment that is
incompatible with C++. My mind boggles. The vendor of the most popular
OS has decided to reject the most popular programming language as obsolete.
G.B.R. wrote:
| Quote: | There is, of course, no problem with parsing or compiling template code.
Latest VC compiler is quite capable of compiling the most convoluted
templates. The real problem, or better say two problems are related to .net
itself. There is no way of compiling templates to MSIL to be supported by
CLR. Even exported templates are not supported by a majority of compilers,
which is a simpler task. Problem number two is that the other languages in
.net do not have similar concept and it cannot be simply introduced there,
because all other c++ rules regarding overloading, lookup, etc., all the
complexities of c++ would need to be dragged into the other languages. The
end result of such metamorphosis would be several c++ languages, each with
its own syntax That's why they are working on a generic solution that
would circumvent those two problems, which I believe will be rather weak
taking into account those constraints.
|
|
|
| Back to top |
|
 |
G.B.R. Guest
|
Posted: Mon Nov 10, 2003 9:43 pm Post subject: Re: What C++ syntax breaks on DOT NET Managed C++? |
|
|
"Randall Parker" <STOPtechiepundit (AT) EVILfuturePOXpunditSPAM (DOT) com> wrote in
message news:3faffeff$1 (AT) newsgroups (DOT) borland.com...
| Quote: | So Microsoft is making a new development environment that is
incompatible with C++. My mind boggles. The vendor of the most popular
OS has decided to reject the most popular programming language as
obsolete. |
I wouldn't say incompatible, the concern is rather about the extensions.
Non-managed c++ implemetation is pretty much standard conforming, if you can
stay in the ANSI boundaries, which most people probably won't. Managed c++
is definitely very much different and is still in a flux. Herb Sutter claims
they're trying to make new managed c++ as painless for developers as
possible (read here
http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&selm=9ceoov827fh0e3k5bggr093a634a7be05m%404ax.com&rnum=4)
It still remains to be seen what they will do to the language. But the
solution I've seen they chose for generics, doesn't impress me at all.
|
|
| Back to top |
|
 |
|
|
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
|
|