- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Change of string representation of function or tuple
scalac prints a function the same way as a tuple:
scala> def f: (String, Int) => Unit = (a, b) => ()
f: (String, Int) => Unit
scala> def g: ((String, Int)) => Unit = a => ()
g: (String, Int) => Unit
This leads to incomprehensible error messages. One of them is mentioned
in this topic on StackOverflow [1].
I think either the string representation of tuples or the one of
functions should be changed.
Is there already a topic discussing this? If not, do you agree to change
the string representations?
[1] http://stackoverflow.com/questions/8610776/scala-map-foreach










Re: Change of string representation of function or tuple
I believe that this has already been fixed and will be rolled out in 2.9.2:
https://issues.scala-lang.org/browse/SI-5067
On 23 Dec 2011, at 00:54, Antoras wrote:
> scalac prints a function the same way as a tuple:
>
> scala> def f: (String, Int) => Unit = (a, b) => ()
> f: (String, Int) => Unit
>
> scala> def g: ((String, Int)) => Unit = a => ()
> g: (String, Int) => Unit
>
> This leads to incomprehensible error messages. One of them is mentioned in this topic on StackOverflow [1].
>
> I think either the string representation of tuples or the one of functions should be changed.
>
> Is there already a topic discussing this? If not, do you agree to change the string representations?
>
> [1] http://stackoverflow.com/questions/8610776/scala-map-foreach
--
paul.butcher->msgCount++
Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?
http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: paul [at] paulbutcher [dot] com
AIM: paulrabutcher
Skype: paulrabutcher
Re: Change of string representation of function or tuple
That are good news. Topic finished.
On 12/23/2011 02:07 AM, Paul Butcher wrote:
> I believe that this has already been fixed and will be rolled out in 2.9.2:
>
> https://issues.scala-lang.org/browse/SI-5067
>
> On 23 Dec 2011, at 00:54, Antoras wrote:
>> scalac prints a function the same way as a tuple:
>>
>> scala> def f: (String, Int) => Unit = (a, b) => ()
>> f: (String, Int) => Unit
>>
>> scala> def g: ((String, Int)) => Unit = a => ()
>> g: (String, Int) => Unit
>>
>> This leads to incomprehensible error messages. One of them is mentioned in this topic on StackOverflow [1].
>>
>> I think either the string representation of tuples or the one of functions should be changed.
>>
>> Is there already a topic discussing this? If not, do you agree to change the string representations?
>>
>> [1] http://stackoverflow.com/questions/8610776/scala-map-foreach
> --
> paul.butcher->msgCount++
>
> Snetterton, Castle Combe, Cadwell Park...
> Who says I have a one track mind?
>
> http://www.paulbutcher.com/
> LinkedIn: http://www.linkedin.com/in/paulbutcher
> MSN: paul [at] paulbutcher [dot] com
> AIM: paulrabutcher
> Skype: paulrabutcher
>
>
>