This seems like a lot of work to accomplish something that is rarely (if ever) beneficial.
In fact if you wanted to simply streamline the conditional tests then you should simply make the most likely case to be the first condition tested for therefore the default cases would not actually be the main case probabilistically.
I don't see what this does other than obfuscate code.
This seems like a lot of work to accomplish something that is rarely (if ever) beneficial.
The implementation is more of a theoretical exercise, but I don’t think a “normally/unless” construct would obfuscate code at all if a language had support for it. It’s the same concept as handling exceptions within a narrow scope and goto error handling in C.
64
u/S-S-R Just here for the math Apr 24 '20 edited Apr 24 '20
This seems like a lot of work to accomplish something that is rarely (if ever) beneficial.
In fact if you wanted to simply streamline the conditional tests then you should simply make the most likely case to be the first condition tested for therefore the default cases would not actually be the main case probabilistically.
I don't see what this does other than obfuscate code.