开发者

Why is there no ARM in Scala stdlib?

开发者 https://www.devze.com 2023-01-23 21:40 出处:网络
W开发者_Python百科hy is there no ARM (like Clojure\'s with-open) provided in the Scala standard library?Short answer

W开发者_Python百科hy is there no ARM (like Clojure's with-open) provided in the Scala standard library?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号