Hi Larry,

Actions can be thought of as a message sento to an object that responds.
The same message can be sent to different objects with each object
responding appropriately. For example, telling a number to add another
number to itself and telling a date to add a number to itself.

Native functions on the other hand are used more for control and to perform
functions that aren't very polymorphic. For example, add is an action
because it can be applied to a number of datatypes. log is a native because
it really only applies to numbers.

Hope this makes it a little clearer.

 - jim

At 11:17 AM 12/9/99 -0800, you wrote:
>Hi Jim,
>
>Sorry to be obtuse, but I don't quite follow your explanation. Could you
>explain what is meant by "a datatype responding to a function"?  Or maybe a
>very short example?
>
>Thanks
>Larry
>
>----- Original Message -----
>From: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, December 09, 1999 12:04 AM
>Subject: [REBOL] What is an action? Re:(2)
>
>
>> Hi Eric,
>>
>> Natives and actions are both C-coded REBOL functions. The difference is
>> that actions are functions that datatypes respond to. Hope that clears
>> things up.
>>
>>  - jim
>>
>> At 10:12 AM 12/9/99 +0900, you wrote:
>> >
>> >Larry,
>> >
>> >Actions are a type of "function" (in its broader Rebol sense of
>> any-function!)
>> >that can't be created using Rebol itself. Actions are for all practical
>> >purposes the same as natives (unless you're a Rebol Creator), but there
>is
>> >some mysterious difference I've never seen explained. Anyone know what
>the
>> >difference is?
>> >
>>
>>
> 

Reply via email to