Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Cache: support arity 2-5 functions #163

Open
thelema opened this Issue Jul 26, 2011 · 7 comments

Comments

Projects
None yet
2 participants
Owner

thelema commented Jul 26, 2011

BatCache should support functions like 'a -> 'b -> 'c and not just 'a -> 'b

Member

vincent-hugot commented Dec 9, 2012

On a related note, batCache declares

let (|>) x f = f x
let tap f x = f x; x

edit: and so do a lot of other modules, actually.

Why not opening BatPervasives ? It doesn't help the second point of #332 if those things are redefined all over the place...

Owner

thelema commented Dec 9, 2012

I think the reason for it was to reduce interdependencies between BatFoo modules, so they could be used independently without increasing executable size so much.

Member

vincent-hugot commented Dec 9, 2012

I thought as much, but I wonder whether Pervasives shouldn't be an exception to this approach.

Owner

thelema commented Dec 9, 2012

Unfortunately, pervasives brings in all of BatIO, which is a huge chunk of code. Maybe factoring out the new stuff (like |>) from pervasives and putting it in an internal module would be helpful for allowing BatCache to depend on this much slimmer module.

Member

vincent-hugot commented Dec 9, 2012

I'm not sure it's worth it, but if anything, it seems the most sensible candidate for that would be the "Fundamental functions and operators" section.

Owner

thelema commented Dec 9, 2012

True, this is a pretty small payback modification, but it's definitely something that will be more important in the hopeful future of OCaml with lots of smaller packages.

Member

vincent-hugot commented Dec 9, 2012

Okay; I'm opening another issue for that, since it affects several modules, not just BatCache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment