Overview
Artifact ID: | 8c4aab473f855d0cd7fc845dbb3552286d174df2 |
---|---|
Ticket: | 5ea6971709bc83c50a5edd1fd184769c958f8c17
FinalizeCreateObject WTF? |
User & Date: | dgp 2015-05-22 17:00:28 |
Changes
- icomment:
FinalizeCreateObject converts all TCL_ERROR codes into reraised [return -level 2] which is implicitly [return -level 2 -code ok] which makes no sense at all. It goes to the trouble of calling Tcl_GetReturnOptions() then throws it away. It has some bizarre dance where the value of "result" is only captured from Tcl_SetReturnOptions() for certain kinds of classes. The whole exercise is just a giant red flag that YOU'RE DOING IT WRONG. Then up in clazzUnknownBody we have to [catch] the TCL_RETURN is order to properly convert it back to a TCL_ERROR. But the whole clazzUnknownBody invocation of handleClass is also broken -- at least in the case where we're using unknown in the TclOO style of reacting to an unknown method. We react to a missing method by creating a new instance of the class with the name of that method? WTF? Broken broken broken broken.
- login: "dgp"
- mimetype: "text/x-fossil-plain"
- severity changed to: "Critical"
- status changed to: "Open"
- title changed to: "FinalizeCreateObject WTF?"
- type changed to: "Code_Defect"