Path: news.daimi.aau.dk!news.uni-c.dk!sunic!trane.uninett.no!nntp.uio.no!usenet From: aas@velociraptor.nr.no (Gisle Aas) Newsgroups: comp.lang.beta Subject: Why can't we have ... ? Date: 15 Sep 1994 08:04:27 GMT Organization: Norwegian Computing Center, Oslo, Norway Lines: 141 Message-ID: Reply-To: Gisle.Aas@nr.no NNTP-Posting-Host: velociraptor.nr.no This is a list of improvements that I would like to see to the Beta language and the Mjølner environment. Some of them obviously araise because I have a background as a C/C++ programmer. 1) A Beta interpreter (the compile cycle is sooooo slow) 2) Better warning error messages from the compiler. For instance, when types don't match, why can't the compiler tell me what types it sees on each side of the arrow. 6) Get a reference manual for the core language. 3) Simpler if-syntax for the common case Why can't: (if a < 0 then ... if) be the same as: (if a < 0 // true then ... if) 4) And/Or short-circuit boolean expressions (as in C). (if (a[]<>none) and (a.foo > 3) then ... if) instead of (if a[]<>none // true then (if a.foo > 3 // true then ... if) if) 5) Get rid of the ugly [] reference syntax: &p[] -> a[]; a[] -> c.p[]; 6) Alternative arrow operator which goes the other way. true -> important; important <- true; This allows us to put the part of the expression that we think is most important to the left where it is easier to spot. 7) Contructors (instead of .init conventions). 8) Until-end-of-line-comments like // in C++ 9) Why can't string literals be one thing? The relationship between string literals and text objects are confusing. Sometimes 'xxx' behaves like an character array (repetition). Sometimes it behaves like an text reference. 10) Send values to (or read values from) INNER. Subclasses should not need to know the name of the index variable. loop: (# index : @integer; limit : @integer; enter limit do (if index < limit then index -> INNER; index + 1 -> index; fi) #); loop(# do -> putint; #); (* this syntax is perhaps to cute *) 11) Declare parameters in the enter/exit part; Put enter/exit before variables. foo: (# enter a : @integer; exit v : @integer; var1: @real; var2: ^text; ... do ... #); 12) Be able to say this more compactly: loop(# while::<(# do something > another -> value; #) do ... #); The "::<(# do" string seams to be common enough to have some shorter version for it. For instace I would like to be able to say: loop(# while [something > another] do ... #) with loop defined as loop: (# while:< BooleanValue(# do INNER -> value #); do loop: (if while then INNER; restart loop if) #); 13) Have multiple enter/exit parts (like overloading in C++) foo: (# x,y : @integer; enter x enter x,y do ... #); then both (3,4) -> foo; 4 -> foo; would be allowed. 14) A simple way to embed Tcl/Tk in Beta applications. -- € Gisle Aas - Norsk Regnesentral