Talk:Modulinos: Difference between revisions

Line 48:
:::I guess I am against what looks like one persons attempt to popularize their own nebulous idea through RC. Is this a different kind of spam? --[[User:Paddy3118|Paddy3118]] 07:34, 8 March 2011 (UTC)
:::: I don't know. It could simply be a case of [https://thelure.wordpress.com/2010/12/06/tais-model/ Tai's Model], or it ''could be a design pattern without an agreed-upon name.'' I could be wrong, but I think it's likely to be the latter. The name 'scripted main' is in no way clarifying to me as to what the pattern is supposed to do. However, the [https://github.com/mcandre/scriptedmain/blob/45e1ea1521fd541681c6db1468ab0964ed8f9595/README README file] from mcandre's GitHub hosting of his initial examples describes a simple behavior, ''"scriptedmain - Programs that only run main() if they're not loaded as libraries by other programs."'' I really think the better description of this is "write a program which does one thing when executed directly and another thing when loaded as part of a larger program." --[[User:Short Circuit|Michael Mol]] 16:21, 8 March 2011 (UTC)
 
::::: Yes, there is some confusion over compiled vs scripted vs interpreted vs assembled code and what qualifies as an executable. For the purposes of this article, I consider any ELF/MACH-O/DOS/WIN32 binary file, and any shebang'ed file as an executable. Strictly compiled languages (C, C++, D, Objective C) don't seem to belong in this article, because programs in those languages already have a good idea of what a main() function does and where it belongs. But, in the subset of compiled languages, some people prefer not to use separate files for API and CLI. E.g., "weak" allows this in C/C++.
::::: For major scripting languages (Perl, Python, Ruby), it's often assumed that API and CLI work together. To beat a dead horse, Python's if __name__=="__main__" is a much sought-after snippet (2,030,000 results in Google at last count). Coders want to know how to do this. I think they want to do this in other languages as well.
::::: For languages in the middle (Octave, Common Lisp, Chicken Scheme, Clojure), it's plumb difficult to achieve this behavior. IRC users refuse to help me, claiming that their language's REPL is infinitely better than shell. That may be, but I like to provide standard, POSIX, CLI interfaces whenever possible. It took me hours to wrestle working snippets--other coders shouldn't have to.
::::: I want to get back on IRC and chat with you guys. You seem interested, and rightly curious. In the mean time, feel free to twitter me at @mcandre. --[[User:Mcandre|Mcandre]]
 
== Ambiguities ==
Anonymous user