Discussion Python's if __name__=="__main__": main() in other languages This behavior is very hard to Google. For now, I'm calling it "scripted main" and I'm cataloging it for several programming languages.Ruby: if __FILE__ == $0 then main endPerl: unless(caller) { main; }...https://github.com/mcandre/scriptedmainDoes anyone know the syntax for this in GNU Smalltalk? 13 points mcandre 15 years ago 3 comments
Ruby: if __FILE__ == $0 then main end
Perl: unless(caller) { main; }
...
https://github.com/mcandre/scriptedmain
Does anyone know the syntax for this in GNU Smalltalk?