Comment on the First Draft of the BNF
Pankaj Jain
January 23, 1997

1: Since we are moving arithmetic etc to a megamodule, the concept of
megamodule becomes important. So we need a construct to declare the
megamodule in the megaprogram. Though we can use the record stucture of
Pascal but since the megamodule has data and methods both so megamodule
parallels a class. I am not saying that Chaims is an OOP language but that
it would be natural to emulate OOP structure. Therefore it might be a good
idea to use an OOP language to form the basis of the Chaims BNF. I did
write a compiler for a simple OOP language called SOOP last quarter called
SOOP and it had a very small BNF that could fit into two pages. Infact for
the purpose of Chaims we can remove a significant part of the BNF as we
don't need to worry about the inheritance and arithmetic expressions.

2. Gio had highlighted a need for short parameter lists while calling
functions. We can have a language in which we have only methods that have
no parameters. Instead we use getproperty and setproperty to get the
result and send the parameters to the megamodules followed by the method
call. If we chose this design then we need to customize our BNF for this.
This may actually simplify the function calls productions in the Chaims
BNF.

3. We also got to decide how much type checking we need to put in the
language

4. Another issue is the control mechanism. We can use while loops, for
loops and goto for control mechanism. Infact goto is considered bad
because it makes programs unreadable when the programs are big and the
jumps may span multiple pages. But is the megaprogram going to be very
big? Also I don't see an immediate need to put the for loop and instead
while loop take care of it.

In the nutshell we must first clearly lay down the goals of our language
very clearly before we get down to designing our language. This may help
us when we have to make the design decisions.



Gio Wiederhold
January 25, 1997

3. While we are being in research mode I'd do very little type
checking if any, but make sure that the design can accomodate type
checking

4. I agree with Pankaj that a GOTO is not horrible in a small program. 
However, it is not clear to me what it does to asynchronous operation.


1/25/97ct