1997Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Languages -->
<!--X-From-R13: pbqreNvoz.arg -->
<!--X-Date: from fabius.globecomm.net [207.51.48.6] by mx5.ibm.net id 863904499.52590&#45;1 Sat May 17 21:28:19 1997 -->
<!--X-Message-Id: 199705172136.VAA299363#out1,ibm.net -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 9705170441.80g8@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Languages</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:coder#ibm,net">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00545.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00547.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00521.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00574.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00546">Author</A>
&nbsp;|&nbsp;<A HREF="#00546">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00546">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Languages</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Languages</LI>
<LI><em>From</em>: <A HREF="mailto:coder#ibm,net">coder#ibm,net</A></LI>
<LI><em>Date</em>: Sat, 17 May 97 13:44:14 -0700</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>

On 16/05/97 at 11:22 PM, cg#ami-cg,graysage.edmonton.ab.ca (Chris Gray)
said: &gt;[John L:]

&gt;:			My only disagreement is with using the curly
&gt;:brackets to distinguish code blocks.  I think you score some good
&gt;:points with better compiler parsing and debugging.
&gt;:However, I think they are more convenient to type, easier to remember
&gt;:and distinguish themselves better than 'fi', 'od', 'esac', etc.
&gt;::-)

&gt;Ah, but you have to count using the shift key in the convenience of
&gt;braces versus short reserved words! :-)

&gt;When I was designing a language like this a few years back, a friend
&gt;commented that I really shouldn't be using 'od' to end 'for' and 'while'
&gt;loops. Algol68 does that because it really only has one loop construct,
&gt;and only the 'do' and 'od' are required. So, he said I should be using
&gt;'rof' and 'elihw'. Maybe, but after I spoke 'elihw' to him for a couple
&gt;of weeks he relented!

A key part of C's use of braces is implicit in the base design of the
language (and obvious when looking at the BNF diagram).  In C, any place
that a statement can be used (in a non-expression context), a pair of
braces containing one or more statements can be used instead.  Its a
slightly subtle and very pleasing piece of orthogonality, and is why:

  if (x) y ();

is just as acceptable as:

  if (x) {
    y ();
  }

and:

  if (x) {
    y ();
    z ();
    ...etc.
  }

I find this is one of the great beautiful simplicities of C over the the
do/od, if/fi, while/elihw type syntaxes.

There are lots of other more interesting examples, such as creating very
locally scoped automatics:

  int funcx (...)
  {
    int var;
    ...code...
    {
      int var;  // A new variable, unique from the one above
      ...code...
    }
    ...mode code...
  }

This last happens to be a trick I use a lot.

-- 
J C Lawrence                               Internet: claw#null,net
----------(*)                              Internet: coder#ibm,net
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00574" HREF="msg00574.html">Re: [MUD-Dev] Languages</A></strong>
<ul compact><li><em>From:</em> silovic#srce,hr (Miroslav Silovic)</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00521" HREF="msg00521.html">Re: [MUD-Dev] Languages</A></STRONG>
<UL><LI><EM>From:</EM> cg#ami-cg,GraySage.Edmonton.AB.CA (Chris Gray)</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00545.html">Re: [MUD-Dev]  Support mud [was Re: Languages]</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00547.html">Re: [MUD-Dev] Re: Prepositions and parsing</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00521.html">Re: [MUD-Dev] Languages</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00574.html">Re: [MUD-Dev] Languages</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00546"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00546"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] Languages</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00540" HREF="msg00540.html">Re: [MUD-Dev] Languages</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sun 18 May 1997, 03:43 GMT
<UL>
<LI><strong><A NAME="00544" HREF="msg00544.html">Re: [MUD-Dev] Languages</A></strong>, 
Dan Root <a href="mailto:dar#thekeep,org">dar#thekeep,org</a>, Sun 18 May 1997, 04:19 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00578" HREF="msg00578.html">Re: [MUD-Dev] Languages</A></strong>, 
Miroslav Silovic <a href="mailto:silovic#srce,hr">silovic#srce,hr</a>, Mon 19 May 1997, 08:44 GMT
</LI>
</ul>
<LI><strong><A NAME="00521" HREF="msg00521.html">Re: [MUD-Dev] Languages</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 17 May 1997, 13:02 GMT
<UL>
<LI><strong><A NAME="00546" HREF="msg00546.html">Re: [MUD-Dev] Languages</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sun 18 May 1997, 04:28 GMT
<UL>
<LI><strong><A NAME="00574" HREF="msg00574.html">Re: [MUD-Dev] Languages</A></strong>, 
Miroslav Silovic <a href="mailto:silovic#srce,hr">silovic#srce,hr</a>, Mon 19 May 1997, 08:04 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00529" HREF="msg00529.html">Re: [MUD-Dev] Languages</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 18 May 1997, 00:32 GMT
<UL>
<LI><strong><A NAME="00535" HREF="msg00535.html">Support mud [was Re: Languages]</A></strong>, 
Matt Chatterley <a href="mailto:root#mpc,dyn.ml.org">root#mpc,dyn.ml.org</a>, Sun 18 May 1997, 02:53 GMT
<UL>
<LI><strong><A NAME="00553" HREF="msg00553.html">Support mud [was Re: Languages]</A></strong>, 
Oliver Jowett <a href="mailto:oliver#sa-search,massey.ac.nz">oliver#sa-search,massey.ac.nz</a>, Sun 18 May 1997, 07:48 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>