On 03/24/2009 12:39 AM, Bill Page wrote:
> On Mon, Mar 23, 2009 at 7:16 PM, Waldek Hebisch wrote:
>> I would say that '::' is how do we use coercions.  One reason to
>> prefer it over coerce is that '::' is much shorter.  Another
>> thing is that I consider '::' as a primitive: what compiler does
>> to implement '::' is just an implementation detail.  Currently
>> of course compiler mainly calls 'coerce' but in principle it
>> can do something smarter.
>>
> 
> This is exactly what worries me. If "what compiler does to implement
> '::' is just an implementation detail", then I worry what exactly is
> the meaning of
> 
>   x+->x::EXPR
> 
> In that sense simply referring to 'coerce' is more specific and as a
> library programmer I am happy to know that it is necessarily calling
> some function named 'coerce' of the required type, rather than doing
> something "smarter" - which might not be what I really want.

Well "a::X" can mean everything, but if (in library code) it means 
anything else than "coerce(a)@X" then I am troubled. And I hope that 
SPAD is not introducing some weird "smart" things for :: that I cannot 
control. I'd consider :: as syntactic sugar, nothing more. For the 
interpreter I'd be more relaxed, but I am currently mainly concerned 
with library code.

Ralf

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to