Why is there no ARM (like Clojure's with-open
) provided in the Scala standard library?
Asked
Active
Viewed 849 times
7

Daniel C. Sobral
- 295,120
- 86
- 501
- 681

unknown
- 71
- 1
-
The [arm tag](http://stackoverflow.com/tags/arm/info) is meant for questions about the ARM processor architecture, so I removed it. – sepp2k Nov 03 '10 at 15:31
-
1Not exactly an answer to your question, but there is such a project: https://github.com/jsuereth/scala-arm – axel22 Nov 03 '10 at 15:44
-
was this a fire-and-forget trolling question? – Kevin Wright Nov 04 '10 at 15:28
1 Answers
11
Short answer
Because nobody's added one yet!
Longer answer
Many proposals for a bigger better I/O library have been put forward, but the best API to use has proved controversial. In particular, the exact way to handle newlines when reading a file line-by-line is a sensitive subject. (e.g. should they be stripped, or passed through as-is? If stripped, should empty lines be skipped over?)
This tends to encourage third-party libraries favouring different needs.
Having said all that... You may want to check out jsuereth's offering on github: https://github.com/jsuereth/scala-arm/wiki

Kevin Wright
- 49,540
- 9
- 105
- 155
-
11That library is designed to be contributed back to scala's core. Everything in it is 100% compatible with the Scala license and all contributers have signed EPFL's contributor agreement. So it's the best place to contribute if you want to see ARM enter Scala's core library. – jsuereth Nov 03 '10 at 15:57