Can you give me a sense of what kinds of things you'd like help on?
There are some basic things that are both important and non-obvious,
like, you should start every project based on Core by doing:
open Core.Std
Do you have any thoughts on what kind of guidance would be helpful?
y
--
Yaron Minsky
I checked the source code of core for fun. It would be very useful if
you could explain all the
module type signatures and the philosophy under it.
for example, what's the real world use of ('a,'b) type_class .. and like
functor Check_S0, Check_S1
...
Thanks, bob
I checked the source code of core for fun. It would be very useful if
you could explain all the
module type signatures and the philosophy under it.for example, what's the real world use of ('a,'b) type_class .. and like
functor Check_S0, Check_S1
S-expressions are much slower, but generate human readable and
tweakable output. That makes it suitable for config files and error
messages.
We also have another syntax extension that shows up throughout Core
called bin-prot. Bin-prot is a binary protocol, which is, like
marshal, fast and unreadable, but it's also safe.
Another nice fact about all of these syntax extensions is that, unlike
marshal or compare or other generic algorithms built into OCaml, you
can override them at the type level. If you don't like the
s-expression auto-generated for maps, you can create your own, which
enforces invariants of your choosing and has whatever syntax you want.
This turns out to be quite important...
y
This is absolutely true!
> So, basic usage of the library (with short description of design
> philosophy of the library) seems to be help.
Yeah, I think we should try to put together a design document for
Core. I've done some thinking about this, but we should do some more,
since it will be useful internally as well. Maybe the first form this
should take is a set of blog posts. Come to think of it, there is an
old post on our blog on this topic:
http://ocaml.janestreet.com/?q=node/28
It covers some of the issues you mention.
y
> Anyway, I'll start to read reference manual of Core to grasp it.
>
> Thank you.
>
> -- nobuyuki
>
--
Yaron Minsky
I think that's a case where we should improve the interface! For all
our talk of consistency, we haven't gotten all of the libraries right,
and we're most likely to be inconsistent on modules that are
descended from modules in Inria's standard library.
y
--
Yaron Minsky
To be precise, in Core, you can do it either way around, because the
function argument is labelled. The following are both valid:
List.iter my_list ~f:(fun x -> ...)
List.iter ~f:(fun x -> ...) my_list