On Sep 24, 11:01 am, Miron Brezuleanu <mbr...@gmail.com> wrote:
> Hello,
>
> I find that I tend to name struct instances like the struct. For instance,
>
> (defstruct person :name)
>
> and then
>
> (let [person (struct person "John")]
> ....)
>
> which breaks further use of (struct person ...) in that let.
>
> Is there an established naming convention that I could use? (I'm
> trying to use (let [aperson (struct person "John")]...) but I'm not
> completely happy with it.)

You could name the struct base <person> or something. I vaguely
remember reading somewhere that this is a Scheme convention of some
sort, but regardless of that, it looks good and doesn't interfere with
calling your persons persons. :)
--~--~---------~--~----~------------~-------~--~----~
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