6 ms·
> this makes it possible to have many data access/manipulation functions that work on all objects. This is not actually true. Add proper type inference and str
by Tuna-Fish 14y ago
> this makes it possible to have many data access/manipulation functions that work on all objects.
This is not actually true. Add proper type inference and structural typing, and it's perfectly possible to have all those generic data manipulation functions while also having strong static typing.
- nkvoll 14y agoBut using structural typing (on the JVM, where Clojure lives) is slow, because it requires using reflection, which severely limits its use currently.
- Tuna-Fish 14y agoI'm talking about structural static typing. At runtime, all the types would be fully determined, so no need for reflection. (Or vcalls for that matter).
- pron 14y agoHow would you write a general function that prints out the values of all fields of any object (without reflection)?
- stuffihavemade 14y agohttp://www.haskell.org/haskellwiki/Template_Haskell http://www.haskell.org/haskellwiki/Template_Haskell
- pron 14y agoI'm not quite sure, but I don't think this has anything to do with structural typing.