Semplicity versus Power
The f2k PDF draft is a book of more than 400 pages! :-(
Using template:
type::point
real ::x,y,z
end type point
type :: event
real:: x,y,z,t
end type event
type(event)::bigbang
subroutine rotation(p)
template(point)::p !!! Hic sunt leones (old Latin maxim)
...
end subroutine rotation
call rotation(bigbang) !!! CORRECT,RIGHT !!!
Please, may you briefly explain to me (and, why not, to all the
[log in to unmask] members) how can I obtain
the same effect using the new and powerful object
oriented f2k instructions ?
The type event must be of necessity an extension
of the type point ?
Thank you
G.Bottoni
In 10.29 04/12/00 -0700, hai scritto:
>Giampaolo Bottoni <[log in to unmask]> wrote:
>...
>>To A.J.Giles <[log in to unmask]>
>>
>>The TEMPLATE instruction purpose is not the replacement
>>of the OOP instructions but the proposal of some new ways.
>>If a function performing the rotation of the three components
>>Point%x, Point%y Point%z is available, why
>>I can't use that function for ALL the objects with
>>the three conponents x, y and z ?
>
>Nothing is wrong with that desire except that other, more
>powerful (and convenient) language features could accomplish
>the same functionality. I sse no reason to clutter up the language
>with something so inflexible.
>
>The OOP feartures can accomplish what you want, and they
>will be in FMMV. It is unlikely that anyone will support a
>feature which adds no new capabilities after that. Some form
>of parametric polymorphism would be a better proposal,
>whether the language already has OOP or not.
>
>---
>
>Note: I selected "reply to author", so this message is going
>to the whole list. :-(
>
>--
>J. Giles
>
|