For Programmers: Free Programming Magazines  


Home > Archive > Fortran > May 2006 > Re: Bounds Check Overhead









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Bounds Check Overhead
jdujic@yahoo.com

2006-05-31, 8:10 am

Richard E Maine wrote:
| Rich Townsend <rhdt@barVOIDtol.udel.edu> wrote:
|
|| Dan Nagle wrote:
|
||| Fortran 2008 has a proposal to allow pointer functions
||| on the left-hand side. The function is evaluated to determine
||| where to store the value of the assignment.
||
|| Hell, we might as well launch the nukes now and be done with it.
|
<snip>
| Note that this isn't a fundamental new capability. It is more of a
| notational convenience. One might view it as elaborating/expanding
the
| definition of lvalue/definable/mutable/chahgeable/whatever.
|
<snip>
| So you have always (since) f90 been able to do
|
| ptr => ptr_func(some_args)
| ptr = an_expression
|
| This new feature just allows you to abbreviate that as
|
| ptr_func(some_args) = an_expression
|
| which I regard as a minor convenience feature rather than something
| radical.

Well, but I wanted to write my own container "class" with overloaded
operators etc. What I could do was:

MODULE M_MyHash
INTERFACE OPERATOR(.OF.)
....
END INTERFACE
CONTAINS
....
END MODULE

TYPE(MyHash):: MH //map of string to foo
....
Foo = MH.OF."ABC"

but not

MH.OF."ABC" = Foo

because, even if operator(.OF.) returned a pointer, the expression
couldn't
be a lvalue/definable (even overriden assignment with "intermediate"
dummy
type as result wouldn't work).

Speaking of which, I would also like to have at least one "parenthesis"
operator
allowed, so that I could write e.g.:

Foo = MH("ABC") or
Foo = MH["ABC"] or
Foo = MH{"ABC"} or
MH{"ABC"} = Foo

--
Jugoslav
___________
www.xeffort.com

Please reply to the newsgroup.
You can find my real e-mail on my home page above.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com