|
From: Marc-Philippe H. <Mar...@un...> - 2011-07-05 11:05:59
|
I agree with David that I prefer something like:
?x = .println("rem") // single value
[?x,?y] = .coords("rem") // list
maybe it is time to remove dust from some of our books on functional programming especially Lisp and Haskell...
Cheers,
mph
Le 05/07/2011 12:08, Rem Collier a écrit :
> the problem with not using a list is that it becomes confused with
> standard assignment (?x = term(...))
>
> the additional overhead to check this (it would need to work out whether
> the rhs is an action or a term) would involve returning to the compiler
> that we had for AFAPL2 and that would mean more work and less
> maintainable...
>
> there is another use of active actions:
>
> durative(activate(action(5), [?x]))
>
> i am not sure that i like:
>
> durative( [?x] = action(5) )
>
> [actually, reading it, i think is is okay - what do you think?]
>
> On 05/07/2011 11:02, David Lillis wrote:
>> 1) Good idea
>>
>> 2) The second syntax is clearer in its intent. For an action that
>> produces only one binding, can we have it work without the list too?
>> i.e.
>>
>> ?x = .println("rem") // single value
>> [?x,?y] = .coords("rem") // list
>>
>> On 5 July 2011 10:23, Rem Collier<rem...@uc...> wrote:
>>> Hi all,
>>>
>>> Following up on the recent introduction of "active" actions (i.e.
>>> actions that can modify the bindings of the associated plan stack), I am
>>> going to suggest two changes / improvements:
>>>
>>> 1) the execute(...) method calls the active action execute method with
>>> an empty variable list and binding set (this means that, potentially -
>>> and only if coded correctly - an active action can be
>>> used as a "normal" action).
>>>
>>> 2) which syntax do you think is better:
>>>
>>> activate(.println("rem"), [?x]))<--- current
>>>
>>> [?x] = .println("rem")<--- alternative
>>>
>>> Rem
>>>
>>> ------------------------------------------------------------------------------
>>> All of the data generated in your IT infrastructure is seriously valuable.
>>> Why? It contains a definitive record of application performance, security
>>> threats, fraudulent activity, and more. Splunk takes this data and makes
>>> sense of it. IT sense. And common sense.
>>> http://p.sf.net/sfu/splunk-d2d-c2
>>> _______________________________________________
>>> Agentfactory-developer mailing list
>>> Age...@li...
>>> https://lists.sourceforge.net/lists/listinfo/agentfactory-developer
>>>
>>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Agentfactory-developer mailing list
> Age...@li...
> https://lists.sourceforge.net/lists/listinfo/agentfactory-developer
>
--
"L'esprit qui invente est toujours mécontent de ses progrès parce qu'il voit au-delà." Jean Le Rond d'Alembert
%%%%%%%%%%%%%%%%%%%%%%
Dr Marc-Philippe Huget
Associate Professor
Polytech Annecy-Chambery-LISTIC
University of Savoie
BP 80439
74944 ANNECY LE VIEUX CEDEX
FRANCE
http://www.unleashagents.com
%%%%%%%%%%%%%%%%%%%%%%
|