Re: [scala-language] The cake’s problem, dotty des ign and the approach to modularity.

Shelby <[email protected]>
Newsgroups gmane.comp.lang.scala
Message-ID <[email protected]>
And the reason to do that is because then you can add new interfaces to the 
vtable at the call site, where the available interfaces on a type are 
scoped, i.e. invert the control but with local control over composition 
collisions.

Whereas, hardcoding the vtable with the instance of the data type means you 
can't invert the control and compose preexisting code with new 
functionality.

And afaics, the conjunctions and disjunctions of Dotty (DOT calculus) are 
essential to tracking types precisely, because as I wrote previously for 
example there is no way to add hetereogeneous types T to for example a 
List[T] at runtime (unless you subsume to Any as Scala does now thus losing 
the types).

I want to experiment with such a solution to the Expression Problem. Does 
anyone think the idea has promise and worth funding as an experiment 
alongside Dotty (hopefully orthogonal experiments can be accomodated in 
Dotty's design)?

Thanks for the feedback. I am hoping for some real big win on language. 
Does Haskell already offer this paradigm with all the boilerplate taken 
care of by the compiler?

On Friday, June 19, 2015 at 1:24:59 AM UTC+8, Rex Kerr wrote:
>
> And there may be such a reason: if you don't lose track of your types at 
> compile-time, you don't need to carry along a pointer to the vtable at 
> runtime.  (This is true in C++, incidentally--only virtual methods are in 
> the vtable.)
>

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.