Deprecate auto-tupling?

255 views
Skip to first unread message

Alex Cruise

unread,
Feb 25, 2013, 7:58:10 PM2/25/13
to scala-debate
I was making Akka requests like this:

  someActor.ask(someMsg, 30000) 

and, since ask is defined to take an Any, the compiler helpfully auto-tupled me out of a type error and into a confusing ten minutes.  Can we get rid of this "feature"? :)

-0xe1a

Grzegorz Kossakowski

unread,
Feb 25, 2013, 8:01:37 PM2/25/13
to Alex Cruise, scala-debate
Did you try -Ywarn-adapted-args option?

--
Grzegorz Kossakowski
Scalac hacker at Typesafe
twitter: @gkossakowski

Alex Cruise

unread,
Feb 25, 2013, 8:03:36 PM2/25/13
to Grzegorz Kossakowski, scala-debate
Nope. Can we turn it on by default? :)

-0xe1a

Roland Kuhn

unread,
Feb 26, 2013, 2:25:59 AM2/26/13
to Alex Cruise, Grzegorz Kossakowski, scala-debate
Hi Alex,

seriously, given previous experience (i.e. man hours wasted) I'd rather have -Ywarn-adapted-args on by default at error level. What makes you say that auto-tupling is a good idea? Or was that meant as sarcasm?


Regards,

Dr. Roland Kuhn
Akka Tech Lead
Typesafe – The software stack for applications that scale.
twitter: @rolandkuhn
--
You received this message because you are subscribed to the Google Groups "scala-debate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-debate...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Roland Kuhn

unread,
Feb 26, 2013, 2:27:16 AM2/26/13
to Alex Cruise, Grzegorz Kossakowski, scala-debate
whoa, sorry for last mail, complete email threading mess-up on my part.



Regards,

Dr. Roland Kuhn
Akka Tech Lead
Typesafe – The software stack for applications that scale.
twitter: @rolandkuhn

On 26 feb 2013, at 02:03, Alex Cruise <al...@cluonflux.com> wrote:

Grzegorz Kossakowski

unread,
Feb 26, 2013, 3:19:57 AM2/26/13
to Alex Cruise, scala-debate
On 25 February 2013 17:03, Alex Cruise <al...@cluonflux.com> wrote:
Nope. Can we turn it on by default? :)

Good question. I don't have any idea how stable/reliable that option is.

Please file a ticket for and set fix version to 2.11-M3 so we can look into that when we have a little bit more time.

Paul Phillips

unread,
Feb 26, 2013, 3:32:51 AM2/26/13
to Grzegorz Kossakowski, Alex Cruise, scala-debate
On Tue, Feb 26, 2013 at 12:19 AM, Grzegorz Kossakowski <grzegorz.k...@gmail.com> wrote:
Good question. I don't have any idea how stable/reliable that option is.

Looks like I haven't had to touch it in 19 months, and the test continues to pass. By the prevailing standards of stability you could found an empire on such bedrock.

Paul Phillips

unread,
Feb 26, 2013, 3:35:30 AM2/26/13
to Alex Cruise, Grzegorz Kossakowski, scala-debate

On Mon, Feb 25, 2013 at 5:03 PM, Alex Cruise <al...@cluonflux.com> wrote:
Nope. Can we turn it on by default? :)

Also, this has been in -Xlint for the whole 19 months. Six little characters.

Alex Cruise

unread,
Feb 26, 2013, 1:00:24 PM2/26/13
to Paul Phillips, Grzegorz Kossakowski, scala-debate
Point taken, pom updated.  But still, is anyone going to argue *for* this "feature"? :)

-0xe1a

 

Aleksey Nikiforov

unread,
Feb 26, 2013, 2:56:53 PM2/26/13
to Alex Cruise, scala-debate
On Tue, Feb 26, 2013 at 12:00 PM, Alex Cruise <al...@cluonflux.com> wrote:

Point taken, pom updated.  But still, is anyone going to argue *for* this "feature"? :)


In many ways argument lists and tuples are very similar concepts. However Scala is lacking a proper synergy between the two. I would argue that auto-tupling provides at least some way to bridge between them. So this is a very useful feature.

If you want an example on how auto-tupling can be used in real world, then have a look at the "Magnet Pattern": http://spray.io/blog/2012-12-13-the-magnet-pattern/

Reply all
Reply to author
Forward
0 new messages