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

Things that are less than adequately specced

5 replies
DRMacIver
Joined: 2008-09-02,
User offline. Last seen 42 years 45 weeks ago.
So, I'm aware of a couple things in Scala that aren't actually covered by its spec. It's not necessarily urgent that these all be specced, but it would be good to have them documented somewhere so we at least know what's what.

The ones I'm aware of:

- Java interoperability (I know this is hard to include in the language spec itself due to the spec's humorous pretense that Scala is multi-platform. But maybe as an addendum to the spec?)
- Case class inheritance (the details of what the hell happens where are totally undefined :-( ).

I believe escaping rules for private types might be on the list as well. At least, I couldn't find them anywhere.

Anything else?
odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Things that are less than adequately specced

On Fri, Feb 27, 2009 at 11:19 AM, David MacIver wrote:
> So, I'm aware of a couple things in Scala that aren't actually covered by
> its spec. It's not necessarily urgent that these all be specced, but it
> would be good to have them documented somewhere so we at least know what's
> what.
>
> The ones I'm aware of:
>
> - Java interoperability (I know this is hard to include in the language spec
> itself due to the spec's humorous pretense that Scala is multi-platform. But
> maybe as an addendum to the spec?)

Well, there is a Scala.NET, and we are currently putting quite a bit
of work into it, to make it fully up to date. Interoperability is a
thorny issue. I agree that it should be speced somwhere.

> - Case class inheritance (the details of what the hell happens where are
> totally undefined :-( ).
>
You mean case clases inheriting from case classes?

> I believe escaping rules for private types might be on the list as well. At
> least, I couldn't find them anywhere.
>
I think you are right. We have to include these.

Cheers

DRMacIver
Joined: 2008-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Things that are less than adequately specced
On Fri, Feb 27, 2009 at 10:34 AM, martin odersky <martin.odersky@epfl.ch> wrote:
On Fri, Feb 27, 2009 at 11:19 AM, David MacIver <david.maciver@gmail.com> wrote:
> So, I'm aware of a couple things in Scala that aren't actually covered by
> its spec. It's not necessarily urgent that these all be specced, but it
> would be good to have them documented somewhere so we at least know what's
> what.
>
> The ones I'm aware of:
>
> - Java interoperability (I know this is hard to include in the language spec
> itself due to the spec's humorous pretense that Scala is multi-platform. But
> maybe as an addendum to the spec?)

Well, there is a Scala.NET, and we are currently putting quite a bit
of work into it, to make it fully up to date.

Well, ok. But I still think this is wasted effort* until the standard library is up to scratch for it. e.g. until you can reasonably write an application using scala.io and no java.io, the set of applications (and, in most cases, libraries) which will run on both platforms is essentially zero. The insistence on things like using the native platform's String type instead of some custom scala.String further worsens the problem.
 
(* Ignoring details such as funding from microsoft :-) )

Anyway, regardless of the .NET debate the interaction with the underlying platform still should be specced, even if it's not part of the core language spec.
 
Interoperability is a
thorny issue. I agree that it should be speced somwhere.

> - Case class inheritance (the details of what the hell happens where are
> totally undefined :-( ).
>
You mean case clases inheriting from case classes?

Right. I'd need to revisit the problem to be sure exactly what information is missing though. A big example is that the subclasses generate equality methods even though the superclasses also have equality defined, and these don't play well together. There are others, but I don't remember what offhand (I try to have very little to do with the feature other than fixing bugs in it).


> I believe escaping rules for private types might be on the list as well. At
> least, I couldn't find them anywhere.
>
I think you are right. We have to include these.

Ok.
milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Things that are less than adequately specced

On Fri, Feb 27, 2009 at 10:19 AM, David MacIver wrote:
> Anything else?

Something reasonably clearcut on type inference rather than relying on
the behaviour of scalac as the implied spec.

For instance, to the best of my knowledge there's nothing in the SLS
which gives a definitive resolution one way or another to this issue,

https://lampsvn.epfl.ch/trac/scala/ticket/1317

Cheers,

Miles

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Things that are less than adequately specced

On Fri, Feb 27, 2009 at 10:19:29AM +0000, David MacIver wrote:
> Anything else?

Tail recursion, which comes to mind quickly because you opened a bug on
it for this very reason and nobody knows the bug database like paulp:

http://lampsvn.epfl.ch/trac/scala/ticket/1219

In the same vein, the emission of switch statements. These are things
that don't necessarily need to be in the SLS, but it's important that
their behavior be better specified than they are at present.

DRMacIver
Joined: 2008-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Things that are less than adequately specced
+1 to both tail recursion and type inference.

Another one which has just occurred to me is arrays. Or rather, they are specified but the specification and the reality do not conform.

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