tag:blogger.com,1999:blog-3840687515615686738.post6878507690161151492..comments2022-03-22T07:59:46.099+01:00Comments on Nikoloogle Lindbloogle: Source's getLines in Scala 2.8 now strips line endNikolaj Lindberghttp://www.blogger.com/profile/12153448128671603936noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-3840687515615686738.post-72555585575754675812010-08-01T04:06:55.272+02:002010-08-01T04:06:55.272+02:00I just had to write something that reads 100000 li...I just had to write something that reads 100000 lines of input, about 45 chars apiece, all 8-bit stuff.<br /><br />BufferedReader(FileReader): 270 ms<br />Source.fromFile.getLines: 1689 ms<br /><br />(Folks who don't think that performance matters need not repeat themselves here...)Ed Staubnoreply@blogger.comtag:blogger.com,1999:blog-3840687515615686738.post-15946085528230957692009-11-16T20:33:38.972+01:002009-11-16T20:33:38.972+01:00Tibi,
I find a breaking change every now and then...Tibi,<br /><br />I find a breaking change every now and then refreshing :)<br /><br />(If I'm not mistaken, one should expect Scala 2.8 to break some 2.7 code.)<br /><br /><br />Daniel,<br /><br />I've noticed that people seem to dislike scala.io a bit... My experience is that it works very well for scripting (smaller text processing tasks) at least. Maybe I'd change my mind, if I were to use it for more demanding stuff.Nikolaj Lindberghttps://www.blogger.com/profile/12153448128671603936noreply@blogger.comtag:blogger.com,1999:blog-3840687515615686738.post-90903640201875058862009-11-16T16:50:22.061+01:002009-11-16T16:50:22.061+01:00If you rely heavily on scala.io you are screwed an...If you rely heavily on scala.io you are screwed anyhow, really. :-(<br /><br />The scala.io library exists simply because scala.xml needed something. It was written as stopgap solution, and it has serious deficiencies. For instance, have you considered when the resource opened by Source is released?<br /><br />Anyway, there is an on-going effort to write a new Scala I/O library, heavily inspired by the lessons learned from JDK7.Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-3840687515615686738.post-64181419624310374712009-11-16T16:26:02.800+01:002009-11-16T16:26:02.800+01:00Not sure it’s good: it’s a breaking change. If you...Not sure it’s good: it’s a breaking change. If you have some code relying on the \n you’re screwed.Tibihttps://www.blogger.com/profile/02711637785610821093noreply@blogger.com