Changes between Version 1 and Version 2 of Ticket #10963, comment 245


Ignore:
Timestamp:
01/05/14 00:16:37 (6 years ago)
Author:
nbruin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10963, comment 245

    v1 v2  
    1313It surprises me that the code does finish. A hash collision would be too rare an event to explain it (especially because most of python only suffers in performance from a bad hash, not in correctness), so my bet is that things depend on a certain order of import/execution and as we know, execution order during imports isn't completely deterministic.
    1414
    15 To fix this: it seems that a lot of the really bad magic (looking at module names etc.) is there for convenience (i.e., that a !FiniteSet is a Set with the Finite axiom). Most of that could be rewritten/ripped out at relatively low cost and inconvenience and would make the code a lot more maintainable and understandable for most non-original-authors, so when Nicholas looks at this (he's the only one who has a chance of being able to fix this stuff) I hope he will consider rewriting the more esotheric stuff. I think there are a lot of potential contributors who can appreciate if the fundamental infrastructure of Sage continues to read like python code if at all possible. The code here looks amazingly ingenious and smart, but unfortunately that is not a desirable trait for basic infrastructure that needs to be maintained for a long time and by many people.
     15To fix this: it seems that a lot of magic (looking at module
     16names etc.) is there for convenience (i.e., that a !FiniteSet is a Set with the
     17Finite axiom). Perhaps it's worthwhile to consider coding these bits a little
     18more conservatively, exchanging some convenience for enhanced maintainability.
    1619
    17 I think the bug/behaviour we're running into now illustrates why "smart" code is often not a good idea: as we see here, the behaviour is hard to predict.
     20When Nicholas looks at this (he's the only one who has a chance of being able to
     21fix this stuff) I hope he will reconsider some of the design decision. I think
     22there are a lot of potential contributors who can appreciate if the fundamental
     23infrastructure of Sage continues to read like a little more normal python code
     24if at all possible.
     25
     26The code here looks amazingly ingenious and smart, but unfortunately that is not
     27a desirable trait for basic infrastructure that needs to be maintained for a
     28long time and by many people.
     29
     30I think the bug/behaviour we're running into now illustrates why "smart" code is
     31often not a good idea: as we see here, the behaviour can be hard to predict.