On Mon, Apr 26, 2010 at 1:05 PM, Nathan O'Treally <not.rea...@online.de> wrote:
> On 26 Apr., 19:23, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> On Apr 25, 2010, at 9:26 AM, Nathan O'Treally wrote:
>>
>> > On 25 Apr., 17:11, Gonzalo Tornaria <torna...@math.utexas.edu> wrote:
>> >> Also, the "== doesn't fail" part seems to force this, since it would
>> >> be even more awkward to hide the coercion failure.
>>
>> > See my last two posts. In addition, Sage behaves different to Python
>> > in many other cases.
>> > (I'd say it is *necessary* to break Python's convention here, i.e.
>> > *don't* hide it, following the Principle of Least Astonishment -- to
>> > mathematicians, not Python programmers -- and staying or getting ;-)
>> > mathematically sound.)
>>
>> Certainly Sage doesn't blindly follow Python conventions for
>> everything (otherwise we wouldn't have a preparser) but there should
>> always be good reason to do things differently, at least for
>> consistencies sake. One reason raising an exception on [in]equality
>> testing is that it would break hetrogenious lists and dictionaries. In
>> fact, dictionaries could be broken in a nondeterministic manner.
>
> Ouch! :D
>
> But one should never use objects of probably incompatible types as
> keys within dictionaries, and a query should cast a "critical type"
> *prior* invocation (same for testing membership in lists).
> I think it *is* already non-deterministic if you put "equal but
> incompatible" keys in a dict and query with a value [of a type] that
> *is* "equal and compatible" to *both* stored types/values.
>
> Class inheritence and templates/parametric polymorphism rock...
> Perhaps Sage should divorce Python. :-)

Let's switch to C++!   Well, perhaps I should first finish my
Lisp-rewrite of Sage [1].

[1] http://www.mail-archive.com/sage-devel@googlegroups.com/msg21687.html

 -- William

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to