Talk:Syntactic sugar
From Wikipedia, the free encyclopedia
Contents |
[edit] Syntactic aspartame
The term ¨Syntactic aspartame¨ has been thrown around lately whilst discussing pugs. Anyone care to enlarge the current article? elpincha 19:30, 27 February 2006 (UTC)
Suggest we merge 'Syntactic saccharin' and 'Syntactic Splenda' sections into one, and include this variant in the text. Twifkak 02:49, 10 December 2006 (UTC)
[edit] rewrite needed
The last paragraph (Splenda) needs rewriting.
[edit] Mediawiki example
I removed this:
"A Mediawiki example would be the ability of signing one's comments in talk pages with --~~~~. The users could manually insert the Wiki code that this is short for, but the syntactic sugar makes it easier."
It's hard to argue that "~~~~" is sugar; it's more like a macro. Especially for the default expansion, it is not simply the case that users could manually insert the "equivalent" code, because this requires them to know their IP address (at least for anonymous users) and the time at the Mediawiki servers in UTC. It's comparable to macros like __LINE__ in C, expanding to the current line number: you could conceivably go through the trouble of finding the expansion out yourself, but that doesn't make the construct syntactic sugar.
As an aside, how notable are the "syntactic foo" variants people have come up with? "Syntactic sugar" and "syntactic salt" are in common use, but the others look like obscure, one-off expressions to me. Not every clever variation people think of should make it into an encyclopedia. 194.151.6.70 22:20, 25 November 2006 (UTC)
[edit] Variants
As an aside, how notable are the "syntactic foo" variants people have come up with? "Syntactic sugar" and "syntactic salt" are in common use, but the others look like obscure, one-off expressions to me. Not every clever variation people think of should make it into an encyclopedia.
I agree with this. A DHH blog post is not a reasonable source for an encyclopedia. I've removed that one, others are welcome to put it back or remove others they know to be 'one off' terms. 24.52.132.106 22:45, 5 December 2006 (UTC)
I also agree. I have never heard of "Syntactic saccharin" and the definition provided does not seem to follow the same analogy as saccharin adds sweetness without adding (many) calories. In that sense it would follow that "Syntactic saccharin" provides the benefits of "Syntactic sugar" with less added syntax. The definition provided suggests that it instead provides no additional sweetness but still adds mass, making it more like an inert "Syntactic salt". But regardless of the definition we give, the term does not appear to be in wide circulation. 216.36.186.2 (talk) 16:00, 7 January 2008 (UTC)
[edit] Explanation Needed
However many modern, "sugar-rich" languages (such as C#) cannot be desugared. Still, their features may be considered "sugar" because primitives exist in predecessor languages (such as C) to fully recreate them.
One would be lead to believe that if a predecessor language can fully recreate the features in a derivative, then this is in fact the definition of syntactic sugar. This needs to be cited, or the fact C is not a subset of C# needs to be explained. —Preceding unsigned comment added by 142.151.168.69 (talk) 04:33, 8 February 2008 (UTC)

