Message from discussion Function questions?
Received: by 10.180.82.226 with SMTP id l2mr2636326wiy.1.1346187794581;
Tue, 28 Aug 2012 14:03:14 -0700 (PDT)
From: nos...@see.signature (Richard Maine)
Subject: Re: Function questions?
Date: Tue, 28 Aug 2012 14:03:12 -0700
References: <email@example.com> <1kpfr0o.ykzota1bisho8Nfirstname.lastname@example.org> <ron-shepard-CE8DCF.email@example.com> <firstname.lastname@example.org> <aa06vrFvddU1@mid.individual.net> <email@example.com> <ron-shepard-FFDBCF.firstname.lastname@example.org> <1kph9a0.10o0f321nh0ho8Nemail@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
X-Trace: individual.net GHXH0MfDqHLb3wdLy2bepQ4U8gnve7dk13FtExRdLyNRTyzSgjlheV+7Dbx6/r6SMs
User-Agent: MacSOUP/2.8.3 (Mac OS X version 10.6.8 (x86))
James Van Buskirk <not_va...@comcast.net> wrote:
> "Wolfgang Kilian" <see...@domain.invalid> wrote in message
> > And IIRC, Fortran 2008 introduces recursive derived types with ALLOCATABLE
> > components, so pointers will no longer be required for allocating ordinary
> > lists/trees - hopefully.
> How in the world is that going to work? You have to insert into,
> delete from, and rebalance trees. Can you really do all the
> necessary shuffling with allocatables rather than pointers?
I briefly wondered about that myself when Wolfgang posted that. I
decided that you probably could, not that I sat down and verified it in
detail. I'm not sure that I'd actually choose to do it that way myself.
My aversion to pointer function results doesn't extend to rejection of
pointers in all roles. Heck, a lot of list/tree structures end up having
pointers to external data anyway. I think I'd still stick with pointers
for purposes like lists/trees, but on due consideration (several seconds
worth), I think it is probably possible with allocatable components.
The "magic words" are move_alloc. I think that's what makes it possible.
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain