I think it's MY C++ background shining through, but I keep reading
(ref->commit) as "execute the commit method of the ref datastructure."
I'll have to echo the lack of enthusiasm of inputting fancy characters,
though the Emacs mode to prettify the display look interesting.

Good luck with the contest,
-- Aaron


On Thu, Jul 30, 2009 at 9:37 PM, Richard Newman <holyg...@gmail.com> wrote:

>
> > What is this convention you are using with the -> ?
> >
> > Are you coming from a C or C++ background or is this something lispy
> > I haven't seen before?
>
> A fair proportion of Common Lispers do that (though I've witnessed
> debates about its merit, usually in the context of low-level code
> where the symbols are already cluttered with [-_+>] etc), exploiting
> the much richer options for symbol names than most languages. It's
> certainly not a dereferencing operation, which is the only context in
> which it would arise for a C/C++ user.
>
> Usually it means "to", either as a conversion or lookup.
>
> (defn ref->commit [ref]
>   ...)
>
> thus means "take this ref and give me the corresponding commit (in the
> context of this repo)". Similarly,
>
> (defn tree-entry->map [e]
>   ...)
>
> takes a Git tree entry string and returns a Clojure map that
> represents it. This is slightly less confusing than `tree-entry-map`,
> which could very well mean some mapping construct over a tree entry,
> or a map of multiple tree entries, or something else.
>
> I haven't been entirely consistent, though -- witness `tree-entry-
> seq`, which should really be `tree-entry->seq`. I said it was a work
> in progress :)
>
> I suppose in Clojure we could use a real arrow character, with UTF-8
> available in symbol names...
>
> -R
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to