Talk:Extend your language: Difference between revisions

m
→‎Java is both omitted and included?: Yeah, probably should remove omit tag
No edit summary
m (→‎Java is both omitted and included?: Yeah, probably should remove omit tag)
 
(16 intermediate revisions by 7 users not shown)
Line 5:
:::: "Create a keyword"? --[[User:Short Circuit|Michael Mol]] 18:34, 27 August 2010 (UTC)
 
:::: "languageLanguage extension without using macros"? Or: "Language syntax extension"? --[[User:Paddy3118|Paddy3118]] 18:56, 27 August 2010 (UTC)
::::: Is it even appropriate to disallow macros? Acknowledging them and asking that it be done with them and without them, for whichever approaches are possible, would strike me as a better approach; it allows on-page classification of which languages support which approach, while showing how to use either approach to accomplish a similar end. --[[User:Short Circuit|Michael Mol]] 18:58, 27 August 2010 (UTC)
 
::::: The task does not actually require new syntax -- for example, the TCL implementation uses the same syntax rules that all TCL implementations follow. (And, "macro" is itself a language-specific concept.) --[[User:Rdm|Rdm]] 18:59, 27 August 2010 (UTC)
 
:::::: For a ''real'' example of syntax extension in Tcl, check out [[Window_creation/X11#Tcl]] which embeds [[C]] directly inside Tcl. Putting one (syntactically totally different) language inside another has got to be real extension, right? :-) However, the code to do it (as opposed to making use of it) is also rather longer than I normally put in an RC solution; that example uses an external library (and an external C compiler too, as it happens, plus weaving of the code back into Tcl). –[[User:Dkf|Donal Fellows]] 07:41, 28 August 2010 (UTC)
 
::::: I wasn't sure, but I guess the concept of "macro" may vary between languages and should ''not'' be banned? --[[User:Paddy3118|Paddy3118]] 19:03, 27 August 2010 (UTC)
 
:::::: I currently do not see any reason to ban any kind of "[[wp:Macro_(computer_science)|macros]]" for this task. And, on a task where it does make sense to ban macros, the undesirable features of macros should be carefully defined so that a person can avoid the undesirable features without also avoiding desirable language features. --[[User:Rdm|Rdm]] 19:13, 27 August 2010 (UTC)
::::::: I hate wikitalk; I need a more convenient way to Upvote or Like points in debates like these. --[[User:Short Circuit|Michael Mol]] 19:15, 27 August 2010 (UTC)
:::::::: If you upvote or give like points, it's not a debate any more. --[[User:Ce|Ce]] 20:58, 27 August 2010 (UTC)
 
:::: IMHO, "create a keyword" would not be optimal. In languages where those extensions are a natural programming style, the term "keyword" is seldom used. Also, "extending the language" then almost always involves flow control in some way, which needs not to be mentioned specifically.
 
:::: For example, the typical case of a domain specific language extension like a HTML library, where a syntax like (please allow me to stay with Lisp syntax) <lang PicoLisp>(<div>
(<head> (build-the-header))
(<p> (get-some-text))
(<table> (make-table-header)
(for X (foo)
(<row> (row-data X)) ) ) )</lang> ''also'' involves flow control, but the central issue is structured output. Still I would call this a language extension. --[[User:Abu|Abu]] 09:48, 28 August 2010 (UTC)
::::: Another area where Tcl can [http://tclxml.sourceforge.net/xmlgen/htmlgen.html do quite well]. :-) –[[User:Dkf|Donal Fellows]] 11:30, 28 August 2010 (UTC)
:::::: If you have an idea, how about posting a new task along that line? Then we might better understand the domain of tasks about "extending the language" --[[User:Abu|Abu]] 11:50, 28 August 2010 (UTC)
Some of the solutions that use macros (Clojure, Common Lisp, Scheme, other?) result in code where the second condition is expanded twice, and thus partially defy the purpose of the new language construct (see the task description: "the code generated by the compiler might be unnecessarily large"). Better solutions might involve direct function calls instead of macros, or variables to keep temporary results. --[[User:Abu|Abu]] 09:15, 31 December 2010 (UTC)
 
== Java is both omitted and included? ==
 
Pardon me as I don't understand how the wiki works 100%, but I've noticed there is a Java entry ''and'' it's included at the bottom of the article as <nowiki>{{omit from|Java}}</nowiki>. Is this a minor oversight?
--[[User:Phunanon|Phunanon]] ([[User talk:Phunanon|talk]]) 14:26, 25 July 2023 (UTC)
 
: The most likely explanation is that at some point in the past, someone decided that the task wasn't possible/feasible in Java, and marked it with an "omit" tag. Then at some later point, someone else added an entry for Java, didn't notice the omit tag (or didn't care about the omit tag) so didn't remove it. Since it obviously has been implemented in Java, the omit tag should probably be removed. I shall do so. Thanks for noticing and bringing it to attention. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 15:04, 25 July 2023 (UTC)
10,327

edits