[Grace-core] typeof/decltype/getType as alternaties to generic methods?

Marco Servetto marco.servetto at gmail.com
Wed Nov 19 23:14:04 PST 2014


ok, if you want map as a method of list,
that is an example of a polimorphic method.
I'm proposing to declare a "new" map type, every time you need to do a mapping,
and
-in a naive implementation you need to split out the type of the result.
-in a more sophisticate implementation, the map can take in input the
FUNCTION to map over at "complile time", and then get the type out of
such function.
Of course this requires the function type to be "statically known"


More information about the Grace-core mailing list