This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Implicit class + inline class SID (Scala Improvement Document)

No replies
Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Cross-posting to scala-language + scala-internals because I wasn't sure where else to push this.

You asked for it, and it's ready for public viewing!   Here is a modified proposal for implicit classes that includes the ability to inline classes.   The ulitmate goal of this proposal is for better 'implicit' performance within Scala.   Specifically for the extension method + typeclass/typetrait patterns embedded in Scala implicits.
Please take a look and offer constructive feedback!
https://docs.google.com/document/d/1k-aGAGmbrDB-2pJ3uDPpHVKno6p-XbnkVHDc07zPrzQ/edit?hl=en_US

Note:  This proposal does not include any syntax sugar fixes for defining typeclasses.  I have an alternative, much more controversial, SID that outlines an annotaiton-based approach to generating typeclass boilerlate.  I can send it to those who are interested, because it's designed to be acheived via annotations + a compiler plugin currently.
- Josh

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland