News for hackers. Stuff that matters.
Re:Faster CPython (2021) [pdf] by igouy on Sunday January 23, 2022 @09:49PM (#30053144)
I wouldn't have thought `become:` was an example that distinguished a dynamic programming language from others.

Where have you seen it used as an example in that way?

Re:Faster CPython (2021) [pdf] by pjmlp on Monday January 24, 2022 @01:58AM (#30054412)
It doesn't distinguish per se, it is rather a good example of something that a dynamic language can make that in a single call makes invalid all assumptions that JIT might have gathered until that point.

As for become: usefulness, Gilad Bracha explains it better than ever will, https://gbracha.blogspot.com/2009/07/miracle-of-become.html

Re:Faster CPython (2021) [pdf] by beagle3 on Monday January 24, 2022 @07:41AM (#30056919)
He does not address JIT efficiency here. A likely implementation is just “lets drop all assumptions related to the type of A”. It would work, but frequent use would kill performance.

Python has all the issues that “become” has, with hundreds of “assumptions might have changed” points along common execution paths.

Liajit, for example, hoists everything it can outside of loops rather quickly, because it knows the cases “become” or Python equivalent can happen, and they are rare and uncommon in idiomatic Lua code.