Article View: comp.lang.c
Article #2011Re: C and its peasant 'ancestors'
From: Ross Finlayson
Date: Mon, 30 Nov 2026 09:28
Date: Mon, 30 Nov 2026 09:28
51 lines
3770 bytes
3770 bytes
On 11/29/2026 07:25 PM, Bonita Montero wrote: > Am 29.11.2026 um 23:45 schrieb Dan Cross: > >> It's actually not even that hard. Most class instances have a >> single pointer to a vtbl; you can "monkey patch" C++ just by >> replacing that with a pointer to a different table that points >> to a different thunk. > > It is hard since a different class has a different object layout > with different state. C++ since "move semantics" which used to be called "re-seating the reference", which wasn't itself a thing in the language, since nothing's to actually "move" except the pointer, about "returning references" to values that don't exist when they're return-results instead of temporary-results, has that "move semantics" then about "ref" and "ref-ref" both conflating return-results and temporary-results, then "splitting into another dialect the templates" the "forwarding-reference" and "universal-reference" and doing the "overloading const", seems a bit the "primrose path" and not all would suggest it. Usual ideas of "multiple-inheritance is hard" also makes for "multiple-inheritance breaks monkey-patching". The "smart-pointer" then about how to make for "depth-count" past "ref-count" on the smart-pointer, not a shared-pointer just a passed-pointer, is a page or so of code. Of course C++ was written with smart-pointers before move-semantics for a perceived "simplicity's" sake basically conflated lifetime with scope. C then is for that pointers then layers of pointer-indirection, have that "**" is basically at least two different types according to whether it's a return-result (an out-parameter) or a temporary-result, _or_, for example, where it's "pointer in front of array so pointer-decay of types results array of fixed-length". The "smart-pointer" then for a "smart-depth-pointer", basically involves in C++ an object to access the smart-depth-pointer, so the object lives according to block/function scope and then as for it being surfaced, has that it either lives on the heap or it doesn't. Or, "the move-semantics the syntactic-sugar is a bit the bitter-pill".
Technical Details
Message-ID:
<F4Wdne_tDqlV3JD2nZ2dnZfqn_adnZ2d@giganews.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-4.nntp.ord.giganews.com!nntp.giganews.com!local-4.nntp.ord.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<11dup6q$v4j9$1@dont-email.me> <11eht6p$3p4pj$1@raubtier-asyl.eternal-september.org> <11ehu0i$3pgmn$1@dont-email.me> <11ehuri$3ps8n$1@raubtier-asyl.eternal-september.org> <11ei9tp$sps$1@reader2.panix.com> <11eiqbe$332f$1@raubtier-asyl.eternal-september.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-4.nntp.ord.giganews.com!nntp.giganews.com!local-4.nntp.ord.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 30 Nov 2026 09:28:40 +0000 Subject: Re: C and its peasant 'ancestors' Newsgroups: comp.lang.c References: <11dup6q$v4j9$1@dont-email.me> <11eht6p$3p4pj$1@raubtier-asyl.eternal-september.org> <11ehu0i$3pgmn$1@dont-email.me> <11ehuri$3ps8n$1@raubtier-asyl.eternal-september.org> <11ei9tp$sps$1@reader2.panix.com> <11eiqbe$332f$1@raubtier-asyl.eternal-september.org> From: Ross Finlayson <ross.a.finlayson@gmail.com> Date: Mon, 30 Nov 2026 01:28:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <11eiqbe$332f$1@raubtier-asyl.eternal-september.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <F4Wdne_tDqlV3JD2nZ2dnZfqn_adnZ2d@giganews.com> Lines: 51 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-m84khQJmcSrlxQMC8gizCnYFjAZYmj3Ali+0Gd0ucd0Qnuwv39cnUv4fxs4aiZMOGzsqSgWA3y5GSVe!b+jUW9WMfUQxENF6lh0PsROsyDJleOxA+v9dVCbq6SwbKqqJNUtpp9GKFfXp7sjtGE31FSdnsjkj X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40