New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consider Evil Mode #11
Comments
The first thing would be to check the current behaviour of The Evil One in the current JS engines. |
Maybe it's cleaner and easier to do the "half thing", as in: function sortedSearch(sortedArray, x, /*?fun?*/less, /*?fun?*/equal)
{
// ....
return improveFirst( // UNCHANGED
sortedArray, x, less, equal, isFirstFound, isLastFound
, first_found, last_found, i, j, imax, jmin
);
}
// ...
// --- Private details
function improveFirst( // UNCHANGED
sortedArray, x, less, equal, isFirstFound, isLastFound
, first_found, last_found, i, j, imax, jmin
)
{
// ...
return mret( // CHANGED
improveLast
, fext.__inputArgs__
);
} for a partial use we could also have Thanks to Julio Di Egidio for his inspiring comment. |
won't do it for now |
won't do the argument macros either, impossible to implement in debug mode |
Actually did it, including support for debug mode :) See top comment of #11, and |
The
sortedSearch
example shows the suffering of having a great tool likenew Function(...)
but no access to the local context.Until JS has tools similar to D's template mixins and string mixins, we might consider an optional activation of the One Evil Thing.
For more background, see the discussion on comp.lang.javascript.
Result
Added a
.getImplEval
method to supporteval
, as in:For a complete use case see
sorted_search_local
about hereThe text was updated successfully, but these errors were encountered: