What are the pros and cons of Batteries and Core? [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-04 08:04:18

问题


In the OCaml world at present there appear to be a number of competing extensions to the standard library, Batteries and Jane Street Core being the major ones as far as I can determine (I understand that ExtLib has been subsumed into Batteries?). What are the pros and cons of each one? Are they equivalent? Can they coexist? Does it make sense to "mix and match" or should I pick one and focus on it? Is Core widely used outside of Jane Street?

If it makes a difference I am on Debian, so Windows support is not a factor for me.

Thanks!


回答1:


Caveat: I'm one of the authors of Batteries (although I've been out of touch for a year now) and the author of the about page linked above.

The big differences are the following:

  • Core is used daily in an industrial environment, while afaik Batteries doesn't have the same following
  • Core is maintained by one company, while Batteries is community-maintained
  • afaik (but I can be wrong), Core doesn't accept submissions or feature requests, while Batteries does
  • Batteries aims to accept any program written for OCaml's standard library, while Core doesn't aim to maintain backward-compatibility
  • Batteries used to come with additional external tools (they're not in the standard distribution at the moment, but I hope they'll return as an additional package), e.g. an improved toplevel, a compiler that requires zero configuration to use Batteries instead of OCaml's stdlib, etc.
  • Batteries comes with additional language extensions e.g. to handle Unicode natively, with a new, safer and more extensible printf, etc.
  • Batteries comes with lots of documentation, while last time I checked, Core didn't.

P.S.: Yes, ExtLib is now a subset of Batteries.




回答2:


The Batteries about page seems to include a comparison to other libraries that answers this question

(scroll down to "Relations to other libraries")

http://batteries.forge.ocamlcore.org/doc.preview:batteries-alpha3/html/about.html



来源:https://stackoverflow.com/questions/3889117/what-are-the-pros-and-cons-of-batteries-and-core

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!