Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there no ARM in Scala stdlib?

Why is there no ARM (like Clojure's with-open) provided in the Scala standard library?

like image 297
unknown Avatar asked Nov 03 '10 15:11

unknown


1 Answers

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

like image 75
Kevin Wright Avatar answered Nov 08 '22 12:11

Kevin Wright