osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Standard library culling and refactoring -
msg#00064

List: lang.scala.debate

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

Recently scala.Either was added to the source tree and then moved to
scalax because it wasn't considered mature enough.

I don't have a particularly strong opinion on this fact, but it does
highlight quite an important point: Almost none of the rest of the
standard library is mature enough either.

In fact, much of the standard library is incomplete, of questionable
value or simply broken.

I think parts of the standard library should simply be removed and
other parts should be factored out into separate projects until they
can get to a level of quality that theyr'e actually worth including as
part of the standard.

- scala.actors.*

I've not used this, but it seems popular and relatively mature (except
the remote actors!). Personally I'd feel it worked better as an
independent project, but I don't really care.

- scala.collection.*

I find scala.collection amazingly ropy. The API is poorly designed
(everything needs to override superclass methods to get the right
return type. Many classes don't), often confusing and frequently
broken. The default immutable map implementation (immutable hash map)
for example is fundamentally broken by design and doesn't even hide it
well. See e.g. https://lampsvn.epfl.ch/trac/scala/ticket/768 . This
API is clearly crucial, but it needs serious attention.

- scala.concurrent

This is in principle useful, but is it actually used? We've got ops,
which is tentatively useful but seems to have, jolib and pilib which
are minimal, undocumented and not particularly clear as to intent.
It's a good start, but it seems to be a good start which never reached
a good middle.

- scala.dbc.*

Incomplete and abandoned as far as I can tell. Does anyone actually
use this? As far as I can tell it only supports PostgresQL and anyone
doing serious work with databases in Scala uses one of the Java ones
or have rolled their own (lift, sygneca)

- scala.io

Obviously I'm biased about the utility of scala.io.BytePickle. :-)
Anyone want to speak up for it? It isn't clear what BufferedSource is
for. it looks like a compiler internal class to me.

- scala.mobile

I assume this is there to support remote actors. Does it actually work?

- scala.ref

Fine.

- scala.reflect

Abandoned. Martin's said at various points that it never really worked
and probably shouldn't be used. But it's not marked as deprecated and
is still there.

- scala.runtime

Are these really meant to be exposed to user level code?

- scala.testing

A diversity of good testing libraries seems preferrable to having this
in the standard libraries.

- scala.text

I don't really have an opinion on this except that it looks more like
someone's toy scala project than a mature and usable part of the
standard lirbary.

- scala.util.{automata, matching, grammar, regexp}

I don't really have an opinion on these. I might do so once the
documentation project figures out what they're for and how to use
them. :-)

- scala.util.parsing.*

Given the presence of combinator and combinatorold packages, this
seems like it's variable enough that it belongs in its own separate
library.

- scala.xml.*

Seems to require language support, so presumably has to stay in the
standard library.



Thread at a glance:

Previous Message by Date:

Re: No Interface Defined (moved from Scala list)

Geoffrey Alan Washburn wrote: I think what you are talking about is more along the likes of prototype based OOP, but I do not really have the time to understand your ideas in depth at the moment. I've already explained the relevant issues and if you want to imagine some other hypothetical language it would be best to redirect your queries to scala-debate. I'm probably bad at using the correct terms, as I'm no expert language designer. Yes, you are correct that it's very similar to a prototype based system, with the addition of abstract types for which there are no instances, they can only be used as "prototypes". Concrete types have exactly one instance, abstract types have exactly zero (naturally). Mutable state is supported by creating new unique concrete subtypes (similar to uniqueness typing I think). Global mutable state can't be defined as there are no fields, only functions. Dependent and virtual types can be supported with similar constructs as found in Scala. /Jesper Nordenberg

Next Message by Date:

Re: Standard library culling and refactoring

On Thu, Apr 17, 2008 at 4:04 PM, Erik Engbrecht <erik.engbrecht@xxxxxxxxx> wrote: > re: Spring cleaning the Scala library > Stripping out some of the immature packages and moving them into a separate > library is a good idea. > > re: scala.collection > I think in an ideal world the introduction of type-constructor polymorphism > would resulted in a completely redesigned collections package. But that > would have created two big problems: > (1) It would have broken existing code As opposed to the current implementation, which is merely broken existing code? I think my objections to scala.collection were poorly phrased. The existing API is a pain, but it could be tidied up to a point where I could live with it. My objections to it are much more that the current implementation is broken. Stack overflows, dodgy design decisions leading to poor performance and flat out wrong results abound. > (2) It would have been a huge task, and probably not done right the first > time. Yes. This is certainly true. > It seems to me that there are probably several areas where from a > language/library design perspective it would be a good idea to make breaking > changes, escpecially given new features in the Scala language. The problem > is that Scala keeps on acquiring new features, many of which seem to require > significant thought and experimentation to grok. So I don't think it would > be a good idea to commit to a given library design until the language > settles down it's evolution a bit. At this time I think it would be best to > have several options on the table. Sure. And moving stuff out of the standard library would help with that. > In my opinion, the substantial breaking changes should be made official in > 3.0, and 3.0 should be much more stable (meaning slower changes) than the > 2.x series has been. Under this scheme, I would anticipate the 2.X series > living for quite a while. Sure. But I think the only viable way to do this is to start working on the replacements now and mark the existing ones as deprecated as we go along and the replacements mature.

Previous Message by Thread:

Re: No Interface Defined (moved from Scala list)

Geoffrey Alan Washburn wrote: I think what you are talking about is more along the likes of prototype based OOP, but I do not really have the time to understand your ideas in depth at the moment. I've already explained the relevant issues and if you want to imagine some other hypothetical language it would be best to redirect your queries to scala-debate. I'm probably bad at using the correct terms, as I'm no expert language designer. Yes, you are correct that it's very similar to a prototype based system, with the addition of abstract types for which there are no instances, they can only be used as "prototypes". Concrete types have exactly one instance, abstract types have exactly zero (naturally). Mutable state is supported by creating new unique concrete subtypes (similar to uniqueness typing I think). Global mutable state can't be defined as there are no fields, only functions. Dependent and virtual types can be supported with similar constructs as found in Scala. /Jesper Nordenberg

Next Message by Thread:

Re: Standard library culling and refactoring

re: Spring cleaning the Scala library Stripping out some of the immature packages and moving them into a separate library is a good idea.   re: scala.collection I think in an ideal world the introduction of type-constructor polymorphism would resulted in a completely redesigned collections package.  But that would have created two big problems: (1)  It would have broken existing code (2)  It would have been a huge task, and probably not done right the first time.   It seems to me that there are probably several areas where from a language/library design perspective it would be a good idea to make breaking changes, escpecially given new features in the Scala language.  The problem is that Scala keeps on acquiring new features, many of which seem to require significant thought and experimentation to grok.  So I don't think it would be a good idea to commit to a given library design until the language settles down it's evolution a bit.  At this time I think it would be best to have several options on the table.   In my opinion, the substantial breaking changes should be made official in 3.0, and 3.0 should be much more stable (meaning slower changes) than the 2.x series has been.  Under this scheme, I would anticipate the 2.X series living for quite a while. -Erik  On 4/17/08, David MacIver <david.maciver@xxxxxxxxx> wrote: Recently scala.Either was added to the source tree and then moved toscalax because it wasn't considered mature enough. I don't have a particularly strong opinion on this fact, but it doeshighlight quite an important point: Almost none of the rest of thestandard library is mature enough either.In fact, much of the standard library is incomplete, of questionable value or simply broken.I think parts of the standard library should simply be removed andother parts should be factored out into separate projects until theycan get to a level of quality that theyr'e actually worth including as part of the standard.- scala.actors.*I've not used this, but it seems popular and relatively mature (exceptthe remote actors!). Personally I'd feel it worked better as anindependent project, but I don't really care. - scala.collection.*I find scala.collection amazingly ropy. The API is poorly designed(everything needs to override superclass methods to get the rightreturn type. Many classes don't), often confusing and frequently broken. The default immutable map implementation (immutable hash map)for example is fundamentally broken by design and doesn't even hide itwell. See e.g. https://lampsvn.epfl.ch/trac/scala/ticket/768 . This API is clearly crucial, but it needs serious attention.- scala.concurrentThis is in principle useful, but is it actually used? We've got ops,which is tentatively useful but seems to have, jolib and pilib which are minimal, undocumented and not particularly clear as to intent.It's a good start, but it seems to be a good start which never reacheda good middle.- scala.dbc.*Incomplete and abandoned as far as I can tell. Does anyone actually use this? As far as I can tell it only supports PostgresQL and anyonedoing serious work with databases in Scala uses one of the Java onesor have rolled their own (lift, sygneca)- scala.io Obviously I'm biased about the utility of scala.io.BytePickle. :-)Anyone want to speak up for it? It isn't clear what BufferedSource isfor. it looks like a compiler internal class to me.- scala.mobile I assume this is there to support remote actors. Does it actually work?- scala.refFine.- scala.reflectAbandoned. Martin's said at various points that it never really workedand probably shouldn't be used. But it's not marked as deprecated and is still there.- scala.runtimeAre these really meant to be exposed to user level code?- scala.testingA diversity of good testing libraries seems preferrable to having thisin the standard libraries. - scala.textI don't really have an opinion on this except that it looks more likesomeone's toy scala project than a mature and usable part of thestandard lirbary.- scala.util.{automata, matching, grammar, regexp} I don't really have an opinion on these. I might do so once thedocumentation project figures out what they're for and how to usethem. :-)- scala.util.parsing.*Given the presence of combinator and combinatorold packages, this seems like it's variable enough that it belongs in its own separatelibrary.- scala.xml.*Seems to require language support, so presumably has to stay in thestandard library. -- http://erikengbrecht.blogspot.com/
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!