Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: A Design Ra...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 6659 of 9984
Post > Topic >>

Re: A Design Rationale for C++/CLI

by Bronek Kozicki <brok@[EMAIL PROTECTED] > Feb 19, 2006 at 10:22 AM

Herb Sutter wrote:
>    In practice, many
>    programmers using a C++/CLI-enabled compiler (currently Visual C++
>    2005) are simply taking advantage of the ability to seamlessly use
>    existing CLI types with their C++ code, which typically requires no
>    extended syntax at all beyond a sprinkling of gcnew and ^.


just a question: is it possible to gcnew a C++ type (that is the one 
with C++ semantics, defined without use of C++/CLI keywords)? If not, 
then I would argue with you that this process "sprinkling with gcnew and 
^" will actually mean one of two (or both):
- significant change of semantics of class being constructed due to 
addition of "value" or "ref" prefix in front of class definition, as CLI 
types have much different semantics than C++ class
- creation of C++/CLI wrappers that will own native C++ cl***** and will 
provide CLI-compliant semantics without change to actual C++ code and 
semantics of C++ types used in the program

I would also argue that first alternative is dangerous one, as it takes 
away many of C++ guarantees from existing C++ code (eg. concerning 
object livetime, const correctness etc) that the programmer had in mind 
when writing the original code.


B.

      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 4 Posts in Topic:
A Design Rationale for C++/CLI
Herb Sutter <hsutter@[  2006-02-19 06:35:56 
Re: A Design Rationale for C++/CLI
Bronek Kozicki <brok@[  2006-02-19 10:22:55 
Re: A Design Rationale for C++/CLI
"Dilip" <rdi  2006-02-20 18:46:36 
Re: A Design Rationale for C++/CLI
"Andrew Browne"  2006-02-22 16:21:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 8:38:09 CDT 2008.