My biggest astonishment is how people continue to shoot themselves in the foot by not making scope vs function declarations explicit. For the reasons that “someone will misunderstand complicated ideas, so let’s make it implicit” or something. While there could be just:
defer x // scope scoped
defer fn x // function scoped
Also:
var a = 0
fn var a = 0
for fn i := …
But we have this allergy to full control and invent these increasingly stupid ways to stay alert and get unpleasantly surprised anyway.
Edit: Same for iifes. Everyone uses them, so turn these into proper embedded blocks!
Edit: Same for iifes. Everyone uses them, so turn these into proper embedded blocks!