18:16  hiredman
http://groups.google.com/group/clojure/browse_thread/thread/83ad2eed5a68f108?hl=en
18:17  hiredman it amazes me how convoluted people can make things
18:17  brehaut hiredman: at least he recognises it
18:17  dnolen mattmitchell: word of advice, just do the simplest
thing. OO brainwashes people into
              over-engineering, wasting time generalizing. Prolly
cause OO code is painful to
              refactor, FP code less so.
18:18  hiredman brehaut: he parrots "eval is evil" but then does this
whole crazy concat thing
                which has nothing to do with anything
18:18  brehaut oh sure, hes neck deep in crazy
18:18  mattmitchell dnolen: excellent thanks for the advice
18:18  hiredman '(Person. "Peter" 18) vs. (concat [(symbol "Person.")]
["Peter"] [18])
18:20  hiredman I dunno why he just doesn't create a factory function
18:20  brehaut if he's a noob maybe he thinks he is supposed to mash a
bunch of lists together and
               then do some metaprogramming ?
18:20  brehaut out of fear that anything else isnt lisp?
18:21  hiredman I don't know
18:21  hiredman it's just bleh
18:22  hiredman like, you want to build a record from names that
resolve to values, but you want to
                delay the binding of the names to values till runtime
18:22 -!- bridgethillyer
[~bridge...@adsl-162-133-208.rmo.bellsouth.net] has joined #clojure
18:22  hiredman anyway, I will stop raving
[#clojure]


On Thu, Feb 3, 2011 at 5:53 PM, Quzanti <quza...@googlemail.com> wrote:
> Hello. I need to dynamically define records
>
> Suppose I have a record
>
> (defrecord Person [name age])
>
> Then to dynamically construct an instance I do a much more complex
> version of
>
> (concat [(symbol "Person.")] ["Peter"] [18])
>
> Where things like Peter and the class of the record are actually the
> results of complicated functions but I have just used simple values
> here for illustration
>
> The problem is I now have a lazy seq, not a record
>
> I can do an eval
>
> (eval (concat [(symbol "Person.")] ["Peter"] [18]))
>
> But eval is evil. So I think my approach is wrong. Any suggestions
> much appreciated
>
> --
> 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



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

-- 
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