Hi,
I just stumbled upon your message, and that reminded me of something I had
thought about.
In Scala, type classes are interfaces, and type class instances are types
implementing these interfaces.
But the receiver type (the self type, the type of the instance), only
serves to define operations,
I see. Thanks for the links, Greg Morrisett's notes are a great survey of
possible approaches to this problem.
It is funny because I had also come to the conclusion that JIT was the
neater solution, as long as JIT is available with the runtime... and you
don't have to implement it -- I guess it's
of dictionaries at runtime is
actually appropriate for solving a real problem in Rust?
Cameron
On Jul 22, 2014, at 10:16 AM, Lionel Parreaux lionel.parre...@gmail.com
wrote:
Hi,
So traits seem to be quite similar to Haskell's classes, being also used
for parametric polymorphism. Now
Hi,
So traits seem to be quite similar to Haskell's classes, being also used
for parametric polymorphism. Now, Haskell classes are usually implemented
using runtime dictionary passing. In general, code cannot be specialized
for every function call, since there may be an unbounded number of