Path: news.daimi.aau.dk!news.uni-c.dk!sunic!trane.uninett.no!nac.no!eunet.no!nuug!EU.net!uunet!cs.utexas.edu!koriel!news2me.EBay.Sun.COM!engnews2.Eng.Sun.COM!olm From: olm@Eng.Sun.COM (Ole Lehrmann Madsen) Newsgroups: comp.lang.beta Subject: Re: BETA syntax question Date: 15 Sep 1994 06:21:16 GMT Organization: Sun Microsystems Inc., Mountain View, CA Lines: 49 Message-ID: <358p4s$btb@engnews2.Eng.Sun.COM> References: NNTP-Posting-Host: det.eng.sun.com X-Newsreader: NN version 6.5.0 #21 (NOV) kurt@Data-IO.COM (Kurt Guntheroth) writes: >I notice the use of some unusual syntactical conventions in beta, like >"blocks" (whatever they're called in beta, I havn't got the book yet) being >delimited by (# and #). >Why did the designers not use curly braces or other single-character >convention? Or is beta one of those languages with syntactic conventions >for both real computers and old-fashioned keypunches? When we designed BETA, we spend a lot of time discussing syntax. It is one of the things people can really disagree about. We tried to develop what we considered a nice and readable syntax with as few long keywords as possible. To following type of brackets are used (# #) object (if if) if-imperative (for for) for-imperative (* *) comment We did consider using {,} for (#,#) or (*,*) but ended up not doing it. C was not widely used in our environments at that time and we did not feel a strong need to have BETA look like C. We did not like long keywords as in Pascal and Ada and BETA has a lot of symbols like @ ^ | : ... We think that for a small language like BETA it is an advantage to have a compact syntax. You can have more code on a page or in a window. Of course {,} is shorter than (#,#), but we chose (#,#) to be consistent with (if,if), etc. It is not our experience that the syntax of BETA is a problem for learning the language. The language has very few constructs (and symbols) and they are easy to learn. Of course you may find the syntax ugly, but it is eays to learn and use:-) Try it! Ole Lehrmann Madsen