17 lines
2.8 KiB
HTML
17 lines
2.8 KiB
HTML
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>syntactic sugar</title><link rel="stylesheet" href="../../jargon.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"/><link rel="home" href="../index.html" title="The Jargon File"/><link rel="up" href="../S.html" title="S"/><link rel="previous" href="syntactic-salt.html" title="syntactic salt"/><link rel="next" href="sys-frog.html" title="sys-frog"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">syntactic sugar</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="syntactic-salt.html">Prev</a> </td><th width="60%" align="center">S</th><td width="20%" align="right"> <a accesskey="n" href="sys-frog.html">Next</a></td></tr></table><hr/></div><dt><a id="syntactic-sugar"/><dt xmlns="" id="syntactic-sugar"><b>syntactic sugar</b>: <span xmlns="http://www.w3.org/1999/xhtml" class="grammar">n.</span></dt></dt><dd><p> [coined by Peter Landin] Features added to a language or other
|
||
formalism to make it ‘sweeter’ for humans, but which do not
|
||
affect the expressiveness of the formalism (compare
|
||
<a href="../C/chrome.html"><i class="glossterm">chrome</i></a>). Used esp. when there is an obvious and
|
||
trivial translation of the ‘sugar’ feature into other
|
||
constructs already present in the notation. C's <b class="command">a[i]</b> notation is syntactic sugar for
|
||
<span class="citerefentry"><span class="refentrytitle">*</span>(a +
|
||
i)</span>. “<span class="quote">Syntactic sugar causes cancer of the
|
||
semicolon.</span>” — Alan Perlis.</p><p>The variants <span class="firstterm">syntactic
|
||
saccharin</span> and <span class="firstterm">syntactic
|
||
syrup</span> are also recorded. These denote something even more
|
||
gratuitous, in that syntactic sugar serves a purpose (making something more
|
||
acceptable to humans), but syntactic saccharin or syrup serve no purpose at
|
||
all. Compare <a href="../C/candygrammar.html"><i class="glossterm">candygrammar</i></a>,
|
||
<a href="syntactic-salt.html"><i class="glossterm">syntactic salt</i></a>.</p></dd><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="syntactic-salt.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="../S.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sys-frog.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">syntactic salt </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> sys-frog</td></tr></table></div></body></html>
|