Re: a history question
From: Arjen Markus (arjen.markus_at_wldelft.nl)
Date: 09/30/04
- Next message: Arjen Markus: "Re: a history question"
- Previous message: Lady Chatterly: "Re: Sandman digest, volume 2453278"
- In reply to: Richard E Maine: "Re: a history question"
- Next in thread: James Giles: "Re: a history question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Sep 2004 08:39:42 +0200
Richard E Maine wrote:
>
> Arjen Markus <arjen.markus@wldelft.nl> writes:
>
> > I have built a small library for dealing
> > with trees. I can store any data type in the nodes of these
> > trees. The trick is to use the not-so-well-known intrinsic function
> > transfer().
>
> I used to do things like that in the earliest days of f90. Eventually
> I gave up and dropped back to using integer indices for the code in
> question. For the particular application in question, indices worked well
> enough, though I still regard it is a bit of a f77-ish workaround. It
> is one of the places where I recognized that the f2003 object-oriented
> stuff should make things much cleaner, more flexible, etc.
>
> Things that made me give up on using transfer() like that were...
>
(... a lot of noteworthy points skipped ...)
>
> Transfer is high on my list of things to use only as a last resort.
> I've got a few uses of it, but not many.
>
Well, I have used this code with several compilers, one very old one.
I know nothing about the speed, as my tests were small-scale so far.
None of the three or four compilers showed any sign of trouble.
The code is rather involved, I agree, but most of the horrid details
can be hidden by providing wrappers to the users. As long as you can
indeed hide the complexity, all seems to be fine. And I would not
use transfer() for anything but those cases where you need to
circumvent the type checking in a very controlled way.
Regards,
Arjen
- Next message: Arjen Markus: "Re: a history question"
- Previous message: Lady Chatterly: "Re: Sandman digest, volume 2453278"
- In reply to: Richard E Maine: "Re: a history question"
- Next in thread: James Giles: "Re: a history question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|