SIP-23: 42, the type formerly known as 42.type -- looking for contributors

279 views
Skip to first unread message

Adriaan Moors

unread,
Oct 28, 2014, 6:20:41 AM10/28/14
to scala-i...@googlegroups.com
Hi,

I fleshed out @folone's prototype implementation of SIP-23: https://github.com/adriaanm/scala/pull/12

I went with Martin's preference for dropping the `.type` suffix.

I'd like to invite everyone to experiment with it, try to break it (and fix it ;-)), and help George & me to flesh out the SIP & its implementation, so that can be included in a future 2.11.x release (under a flag, of course). This is a prerequisite for the SIP being officially included in 2.12.0.

For more concrete info/TODOs, please see the PR linked above.

thanks!
adriaan

George Leontiev

unread,
Oct 28, 2014, 7:04:20 AM10/28/14
to scala-i...@googlegroups.com
Awesome work, thanks so much Adriaan!

I've posted some questions/observations in the PR discussion. Got some basic smoke tests here: https://github.com/folone/scala/blob/topic/42.type/test/files/run/42.type.scala.

Excited to see this feature getting some work done by people who know what they are doing (unlike myself :)!

Thanks!

Denys Shabalin

unread,
Oct 30, 2014, 8:11:57 AM10/30/14
to scala-i...@googlegroups.com
By the way is there any hope to revive effort on singleton type inference [1] [2] in light of this sip? It looks like this is very much desired functionality [3]. Sadly without it singleton types aren’t very practical at the moment (as you can’t abstract over them without too much boilerplate.)


--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Zaugg

unread,
Oct 30, 2014, 8:27:50 AM10/30/14
to scala-i...@googlegroups.com
On Thu, Oct 30, 2014 at 10:11 PM, Denys Shabalin <denys.s...@epfl.ch> wrote:
By the way is there any hope to revive effort on singleton type inference [1] [2] in light of this sip? It looks like this is very much desired functionality [3]. Sadly without it singleton types aren’t very practical at the moment (as you can’t abstract over them without too much boilerplate.)

I believe that Adriaan is shooting for the same effect with precludesWidening, but there is still work to do.

-jason

Denys Shabalin

unread,
Oct 30, 2014, 5:11:39 PM10/30/14
to scala-i...@googlegroups.com
I was googling around and stumbled upon this: http://existentialtype.net/2008/07/21/literally-dependent-types/

Apparently some people were hacking 42.type support before it was cool.

Lukas Rytz

unread,
Oct 30, 2014, 5:20:57 PM10/30/14
to scala-i...@googlegroups.com
Geoff was a post-doc at LAMP back then – good old times :-)

Naftoli Gugenheim

unread,
Oct 30, 2014, 7:14:59 PM10/30/14
to scala-internals
On Tue, Oct 28, 2014 at 6:20 AM, Adriaan Moors <adr...@typesafe.com> wrote:
Hi,

I fleshed out @folone's prototype implementation of SIP-23: https://github.com/adriaanm/scala/pull/12

I went with Martin's preference for dropping the `.type` suffix.

I guess we discussed it already... but this will make scala syntax more confusing for newbies, and also less principle-of-least-surprise conformant...

 

I'd like to invite everyone to experiment with it, try to break it (and fix it ;-)), and help George & me to flesh out the SIP & its implementation, so that can be included in a future 2.11.x release (under a flag, of course). This is a prerequisite for the SIP being officially included in 2.12.0.

For more concrete info/TODOs, please see the PR linked above.

thanks!
adriaan

--
Reply all
Reply to author
Forward
0 new messages