Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Development Strategies [Was Documentation, Usability a
Home

[Freeciv-Dev] Re: Development Strategies [Was Documentation, Usability a

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Development Strategies [Was Documentation, Usability and Development]
From: Gregor Zeitlinger <zeitling@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Dec 2001 16:13:41 +0100 (CET)
Reply-to: gregor@xxxxxxxxxxxxx

On Mon, 3 Dec 2001, Daniel L Speyer wrote:
> (setq healer (make-object 'attack 0 
>                           'defend 1 
>                         'move 2 
>                         'ignore-zoc t 
>                         'max-health 10))
> (setf (get-object healer 'done-hook)
>       #'(lambda (me)
>         (mapcar 
>          #'(lambda (x) (setf (get-object x 'health) 
>                              (get-object x 'max-health)))
>          (get-unit-list (get-tile me)))))
> (create-unit healer)
I'm impressed. It's somewhat obscure for an OO programmer like me but
since it is an easy example. How would that look in a Java scripting
language? Not as pretty probably.
But - beauty of syntax istn't the only argument.

-- 
Gregor Zeitlinger      
gregor@xxxxxxxxxxxxx



[Prev in Thread] Current Thread [Next in Thread]