3 ms·
> Funny how exploiting uninitialized variables is evil in (nonstrict) JavaScript but good in Awk. I agree that’s true, mind you, I just can’t pinpoint what abou
by AdieuToLogic 2y ago
> Funny how exploiting uninitialized variables is evil in (nonstrict) JavaScript but good in Awk. I agree that’s true, mind you, I just can’t pinpoint what about the languages’ designs makes it work in one case but not the other.
I believe Awk's semantic behaviour is a kindred spirit of Perl's autovivication[0].
It is often handy and sometimes can bite one in the proverbial backside.
0 - https://en.wikipedia.org/wiki/Autovivification https://en.wikipedia.org/wiki/Autovivification