Path: news.daimi.aau.dk!news.uni-c.dk!sunic!trane.uninett.no!eunet.no!nuug!EU.net!news.kreonet.re.kr!overload.lbl.gov!lll-winken.llnl.gov!koriel!news2me.EBay.Sun.COM!engnews2.Eng.Sun.COM!olm From: olm@Eng.Sun.COM (Ole Lehrmann Madsen) Newsgroups: comp.lang.beta Subject: Re: Why can't we have ... ? Date: 19 Sep 1994 05:41:07 GMT Organization: Sun Microsystems Inc., Mountain View, CA Lines: 203 Message-ID: <35j89j$3l5@engnews2.Eng.Sun.COM> References: NNTP-Posting-Host: det.eng.sun.com X-Newsreader: NN version 6.5.0 #21 (NOV) aas@velociraptor.nr.no (Gisle Aas) writes: >This is a list of improvements that I would like to see to the Beta >language and the Mjolner 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) Which machines are you using? The compiler has improved a lot recently but there are still someting that can be done to make it faster and Mjolner Informatics is constantly working on improving it. >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. This has been improved in release 3.0. If there are still cases with poor error messages please send such examples to support@mjolner.dk >6) Get a reference manual for the core language. We are working on this and a reference manual should be ready soon. (it is difficult to set a specific date) >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) As Jacob already said, this syntax is supported by release 3.0 >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) We are considering to make boolean expressions short-circuit always! >5) Get rid of the ugly [] reference syntax: > &p[] -> a[]; a[] -> c.p[]; I agree that it is ugly. We, however, want to be conservative in changing the language. We keep a list of desired changes and at some point we may decide on making some changes, but there are no current plans. >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. > I dont think that it is a good idea to support two different forms of assignment syntax! >7) Contructors (instead of .init conventions). I agree that some form of constructors are desirable and it may be added to a future version of the language. >8) Until-end-of-line-comments like // in C++ Personally I dont find this important, but if enough people thinks it is important we may add it. >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. Please send us some examples of where you find this to be confusing. >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 *) This is something we have discussed a number of times and might be worth considering again. I dont, however, think that it is a problem that subclasses must know the name of the index variable. The index variable is part of the interface just as the attributes of a class in general are part of the interface. >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 > ... > #); We are considering the possibility to declare variables in the enter/exit part. I dont find a need to be able to declare enter/exit before variables Variables which are not parameters may be declared after the do-part foo: (# a,v: @integer enter a do (# var1: @real; var2: ^text; ... do ... #)#) exit v #) >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) > #); I agree that a shorter syntax will be desirable >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. I dont think that overloading is worth the extra complexity of the language. >14) A simple way to embed Tcl/Tk in Beta applications. Yes - this will be nice. I once saw a mail from somebody saying he worked on this, so perhaps it might soon be available? ---olm >-- > Gisle Aas - Norsk Regnesentral