(j3.2006) reduction routine
Aleksandar Donev
adonev
Wed May 19 15:18:30 EDT 2010
On Wednesday 19 May 2010, Bill Long wrote:
> Is there a better method?
Depends on what you mean by "better"---more OOPish? What you have in
mind does not work in the way you wrote it (using a string to pass the
method name), though I guess it can be done for an intrinsic in many
different ways. For a non-intrinsic, in OOP land, I believe that passing
methods as arguments to methods is done via "delegates". I do not know
if there is some equivalent for generics. It seems non-trivial...
Aleks
--
Aleksandar Donev, Ph.D.
Luis W. Alvarez Postdoctoral Fellow
Center for Computational Sciences and Engineering (https://ccse.lbl.gov)
Lawrence Berkeley National Laboratory (http://www.lbl.gov)
E-mail: adonev at lbl.gov
Phone: (510) 486-5782 Fax: (510) 486-6900
Address: MS 50A-1148, LBL, 1 Cyclotron Rd., Berkeley, CA 94720
Web: http://cims.nyu.edu/~donev/
More information about the J3
mailing list