#1298: opcodes, warnings, and exceptions
----------------------+-----------------------------------------------------
 Reporter:  particle  |       Owner:  whiteknight
     Type:  RFC       |      Status:  new        
 Priority:  trivial   |   Milestone:             
Component:  core      |     Version:             
 Severity:  medium    |    Keywords:             
     Lang:            |       Patch:             
 Platform:            |  
----------------------+-----------------------------------------------------
Changes (by whiteknight):

  * owner:  => whiteknight


Comment:

 Unfortunately this is a pretty bit job. We have several hundred opcodes,
 and no clear idea for what they should do. My personal preference is to
 not throw exceptions where a null result does not cause a semi-predicate
 problem. In the case of the string opcode, returning a 0 for null or an
 empty string is kind of ambiguous, and we probably do want to
 differentiate. In another common case, such as find_method, returning a
 null is probably preferable to throwing an exception, I think (and there
 are hundreds of more examples where we would have to look on a case-by-
 case basis and make these kinds of decisions).

 I can do a certain amount of review (and I'm happy to volunteer cotto to
 take a look as well), but in the end it's probably a huge amount of work.
 When you combine in the effort it would take to set up deprecations for
 everything we find that needs to change, and all the tests that we would
 need to update for each change, this ticket really does become
 unmanageably huge. I'll do what I can, but unless I hear more support for
 this ticket, it will probably be closed long before reaching perfect
 consistency.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1298#comment:4>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to