I must be missing something. Even if you have to make every
modification inside a dosync using the syntax that you originally
provided, why not write a function that captures that and be done with
it? Or, if you have to, a macro? That is, it seems like the complaint
is "too much repeated code", but Clojure actually gives you *more*
tools for removing redundancy than most languages...

Maybe I'm missing something, though.

On Thu, Nov 20, 2008 at 10:42 PM, islon <[EMAIL PROTECTED]> wrote:
>
> I gave up, the resulting code would be a lot more complex than the
> scala version.
> But thanks for your advices.
>
> If anyone wants to port it I can send the source code, it's ~1000
> lines total.
>
> Islon
>
> On Nov 20, 11:38 pm, harrison clarke <[EMAIL PROTECTED]> wrote:
>> i was thinking that each stat would be an agent.
>> whatever boats your float, i guess. i'm probably not the person to go
>> to about idiomatic code. :V
>>
>> user> (let [player {:str (agent 5)
>>               :dex (agent 5)}
>>       str (:str player)
>>       dex (:dex player)]
>>   (println @str @dex)
>>   (send str + 1)
>>   (send dex * 2)
>>   (println @str @dex)
>>   (await str dex)
>>   (println @str @dex))
>> 5 5
>> 5 5
>> 6 10
>> nil
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to