Re: Strong/weak pointers

glen herrmannsfeldt <gah@ugcs.caltech.edu>
Wed, 03 Sep 2008 09:58:59 -0800

          From comp.compilers

Related articles
Strong/weak pointers m.helvensteijn@gmail.com (Michiel Helvensteijn) (2008-09-01)
Re: Strong/weak pointers licaner@gmail.com (lican) (2008-09-01)
Re: Strong/weak pointers Jan.Vorbrueggen@thomson.net (=?ISO-8859-15?Q?Jan_Vorbr=FCggen?=) (2008-09-02)
Re: Strong/weak pointers marcov@stack.nl (Marco van de Voort) (2008-09-02)
Re: Strong/weak pointers torbenm@pc-003.diku.dk (2008-09-02)
Re: Strong/weak pointers mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-09-02)
Re: Strong/weak pointers armelasselin@hotmail.com (Armel) (2008-09-03)
Re: Strong/weak pointers gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-09-03)
Re: Strong/weak pointers james.williams1952@gmail.com (JW) (2008-09-03)
Re: Strong/weak pointers lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-09-04)
Re: Strong/weak pointers georgeps@xmission.com (GPS) (2008-09-06)
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: Wed, 03 Sep 2008 09:58:59 -0800
Organization: Compilers Central
References: 08-09-004 08-09-008
Keywords: storage, design
Posted-Date: 03 Sep 2008 15:15:56 EDT

lican wrote:


> Well, to be honest I think if you give a programmer too much power he/
> she wouldn't know what to do with it. In this case it would be
> something like 'should I use the weak one? no, I have to have at least
> one reference... but wait, what will be deleted first?' and such.


The idea of Strong/Weak pointers reminds me most of ordinary and
weak external references in some systems. A weak external reference
won't pull in a library routine, but will be resolved if the symbol
is already defined, either through another non-weak reference or
as an alternate entry point to an already included module.


They aren't needed all that often, but sometimes can be useful.


I don't understand the connection to calls to routines in
other languages. I sort of see the connection to Fortran
ALLOCATABLE, but it seems a weak connection to me.


At first I thought that it would helps with the circular
linked list problem, but it seems that it doesn't help
all that much.


Are there any good examples of how to use them?


-- glen


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.