On Aug 17, 2011, at 7:40 PM, Andrew Pennebaker wrote:

> Thanks Joe, that helps a lot. Do you know if Factor has an equivalent this 
> Python's idiom?
> 
> if __name__=="__main__":
>    main()

The idiomatic equivalent is the MAIN: annotation. USING: a module from another 
module will not invoke its MAIN: entry point, but run-ing a module or deploying 
it will start execution from its MAIN:, which is similar to what the Python 
idiom tries to achieve. However, as you noted, the MAIN: entry will also not be 
invoked for a script evaluated from the commandline. Factor is geared more 
toward interactive development and standalone deployment, and its usability as 
a #!-style scripting language is a bit of an afterthought (as you've seen).

-Joe

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to