Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #13162

Re: plz xplain behavior of const_cast

From 88888 Dihedral <dihedral88888@googlemail.com>
Newsgroups comp.lang.c++
Subject Re: plz xplain behavior of const_cast
Date 2012-01-07 03:53 -0800
Organization http://groups.google.com
Message-ID <14946809.1056.1325937195262.JavaMail.geo-discussion-forums@prnp7> (permalink)
References <99gag79ess5jgiiap1da1ggotvh8sv55is@4ax.com> <je3l5m$12g$1@dont-email.me> <b75672b2-04e7-4002-8655-b27d2b3f497c@o14g2000vbo.googlegroups.com> <je57i1$4af$1@dont-email.me> <slrnjgfq36.1ls.grahn+nntp@frailea.sa.invalid>

Show all headers | View raw


Jorgen Grahn於 2012年1月7日星期六UTC+8下午2時38分32秒寫道:
> On Thu, 2012-01-05, Alf P. Steinbach wrote:
> ...
> > Hm, I don't think there are really many who start out with C and migrate 
> > up. Rather they migrate sideways/down from Java and C#. They don't pick 
> > up all these weird inheritance patterns and singletons and abstract 
> > factories and managers and whatnot in C, I think.
> 
> I happen to dislike much of that stuff too, but I think it's unfair to
> describe it as a virus from the Java world. When people come to their
> first language which supports object-oriented programming, they will
> want to learn about that OOP stuff, and they will find those things
> there.
> 
> /Jorgen

The object programming in C++ can be summarized as follows:

1. class inheritance and object properties set up 
  by the compiler for all static parts and a bunch of static functors with 
  *this as the hidden parameter

2. one vtable in a class and  one vpointer in an object to be used to  
invoke the right function pointer as a virtual function  at the run-time

3. the operator reloading part similar to   smalltalk only in syntax but not very helpful  in developing cad tools or code generators
  

 


> -- 
>   // Jorgen Grahn <grahn@  Oo  o.   .     .
> \X/     snipabacken.se>   O  o   .

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

plz xplain behavior of const_cast Heck <heckja_in@ordertostymieharvestersverizon.net> - 2012-01-05 02:01 -0500
  Re: plz xplain behavior of const_cast Christian Gollwitzer <auriocus@gmx.de> - 2012-01-05 08:53 +0100
  Re: plz xplain behavior of const_cast "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-01-05 08:57 +0100
    Re: plz xplain behavior of const_cast gwowen <gwowen@gmail.com> - 2012-01-05 04:00 -0800
      Re: plz xplain behavior of const_cast "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-01-05 23:17 +0100
        Re: plz xplain behavior of const_cast Ian Collins <ian-news@hotmail.com> - 2012-01-06 11:38 +1300
        Re: plz xplain behavior of const_cast Gareth Owen <gwowen@gmail.com> - 2012-01-06 06:33 +0000
        Re: plz xplain behavior of const_cast Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-01-06 00:46 -0800
          Re: plz xplain behavior of const_cast gwowen <gwowen@gmail.com> - 2012-01-06 03:19 -0800
        Re: plz xplain behavior of const_cast Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-01-07 06:38 +0000
          Re: plz xplain behavior of const_cast 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-07 03:53 -0800
      Re: plz xplain behavior of const_cast Juha Nieminen <nospam@thanks.invalid> - 2012-01-06 09:14 +0000
  Re: plz xplain behavior of const_cast Goran <goran.pusic@gmail.com> - 2012-01-04 23:55 -0800
  Re: plz xplain behavior of const_cast jt@toerring.de (Jens Thoms Toerring) - 2012-01-05 09:04 +0000
  Re: plz xplain behavior of const_cast Heck <heckja_in@ordertostymieharvestersverizon.net> - 2012-01-05 09:36 -0500

csiph-web