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

Re: Scala IO

4 replies
odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.

I think it's great to do a proper Scala IO library! NIO2 looks like it
has many important ideas and clever implementations, so we should
study it in depth and try not to do anything that's imcompatible with
it. On that other hand,
dropping Java 6 support for the main Scala distribution is at least 2
years away.

One possibility might be to work NIO 2 compatibility into the design
but use simpler implementations, or even mark some methods as only
implemented on Java 7. Clearly this will require more thought...

Cheers

Viktor Klang
Joined: 2008-12-17,
User offline. Last seen 1 year 27 weeks ago.
Re: Scala IO
Now I haven't studied NIO2 at all,
but given that it does not rely on other Java7 libraries to function, wouldn't it be feasible to just rip it out of OpenJDK and provide it as a Scala extension for any Scala library built on top of it?

On Tue, Sep 8, 2009 at 4:13 PM, martin odersky <martin.odersky@epfl.ch> wrote:
I think it's great to do a proper Scala IO library! NIO2 looks like it
has many important ideas and clever implementations, so we should
study it in depth and try not to do anything that's imcompatible with
it. On that other hand,
dropping Java 6 support for the main Scala distribution is at least 2
years away.

One possibility might be to work NIO 2 compatibility into the design
but  use simpler implementations, or even mark some methods as only
implemented on Java 7. Clearly this will require more thought...

Cheers

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Scala IO

On Tue, Sep 8, 2009 at 3:30 PM, Viktor Klang wrote:
> Now I haven't studied NIO2 at all,
> but given that it does not rely on other Java7 libraries to function,
> wouldn't it be feasible to just rip it out of OpenJDK and provide it as a
> Scala extension for any Scala library built on top of it?

That's tricky because there are platform dependencies down to the
native level ... this is just one of the reasons why we really want to
leverage NIO2 rather than try and replicate it.

There's a backport to JDK6, but unfortunately only for Linux,

http://code.google.com/p/jsr203-backport/

Cheers,

Miles

Ricky Clarkson
Joined: 2008-12-19,
User offline. Last seen 3 years 2 weeks ago.
Re: Scala IO

It must rely on native methods, therefore "No.".

2009/9/8 Viktor Klang :
> Now I haven't studied NIO2 at all,
> but given that it does not rely on other Java7 libraries to function,
> wouldn't it be feasible to just rip it out of OpenJDK and provide it as a
> Scala extension for any Scala library built on top of it?
>
> On Tue, Sep 8, 2009 at 4:13 PM, martin odersky
> wrote:
>>
>> I think it's great to do a proper Scala IO library! NIO2 looks like it
>> has many important ideas and clever implementations, so we should
>> study it in depth and try not to do anything that's imcompatible with
>> it. On that other hand,
>> dropping Java 6 support for the main Scala distribution is at least 2
>> years away.
>>
>> One possibility might be to work NIO 2 compatibility into the design
>> but  use simpler implementations, or even mark some methods as only
>> implemented on Java 7. Clearly this will require more thought...
>>
>> Cheers
>>
>>  -- Martin
>
>
>
> --
> Viktor Klang
>
> Blog: klangism.blogspot.com
> Twttr: viktorklang
>
> Lift Committer - liftweb.com
> AKKA Committer - akkasource.org
> Cassidy - github.com/viktorklang/Cassidy.git
> SoftPub founder: http://groups.google.com/group/softpub
>

Jorge Ortiz
Joined: 2008-12-16,
User offline. Last seen 29 weeks 4 days ago.
Re: Scala IO

One possibility might be to work NIO 2 compatibility into the design
but  use simpler implementations, or even mark some methods as only
implemented on Java 7. Clearly this will require more thought...

This sounds promising. Similar issues come up in the design of concurrency libraries for Scala. There are just too many goodies in Java 6/7.

--j

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