lotus



previous page: L16) Why doesn't BETA have multiple inheritance?
  
page up: BETA Programming Language FAQ
  
next page: L18) How do the scope rules of BETA actually work?

L17) What is the rationale behind the syntax of BETA?




Description

This article is from the FAQ, by with numerous contributions by others.

L17) What is the rationale behind the syntax of BETA?

[Ole Lehrmann Madsen (olm@daimi.aau.dk) writes:]

When we designed BETA, we spent a lot of time discussing syntax - it is one
of those things people can really disagree about. We tried to develop what
we considered to be a nice and readable syntax with as few long keywords as
possible.

The following type of brackets are used:

     (# ... #)     object
     (* ... *)     comment
    (if ... if)    if-imperative
   (for ... for)   for-imperative

We did consider using { and } for objects or comments, but ended up not
doing it; we did not feel a strong need to have BETA look like C.

As we did not like long keywords (as in Pascal or Ada), BETA uses symbols
like @, ^, |, and :< instead. We believe that for a small language like
BETA, it is an advantage to have a compact syntax. This way, you can have
more code on a page or in a window. (Of course, {,} is shorter than (#,#),
but we preferred the syntax to be consistent with (if,if), etc.)

It is not our experience that the syntax of BETA presents any obstacle to
learning the language. BETA has very few constructs (and symbols), and while
they may seem strange at first, they are easy to learn and use. Try it!

You can find a quick overview of the BETA syntax by looking at the BETA
Quick Reference Card

 

Continue to:















TOP
previous page: L16) Why doesn't BETA have multiple inheritance?
  
page up: BETA Programming Language FAQ
  
next page: L18) How do the scope rules of BETA actually work?