开发者

Why is there no ARM in Scala stdlib?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜