Peter Tanski wrote:
>> What's the opinion of 'getting rid' of semicolons?
> [snip]
>
> I think that would be confusing--even to programmers.  Either define 
> instances that never require semicolons (and stick with them) or keep 
> semicolons.  Imagine trying to (a) create error messages or (b) read 
> error messages related to the lack of a semicolon as an explicit 
> terminator on a statement that needed it. 

I'm a little more extreme. I vote that we either have an optional layout 
form like Haskell, or we stick with terminators everywhere. It makes 
things more consistent and easier to read, so you don't have to always 
parse a statement to figure out if something is a keyword or not. Also 
note that we'll occasionally have keywords in expressions:

forall x
in 0
upto 5
do
...

that would get confusing if things are not consistent.


>> Although this isn't "layout" based parsing,
>> it may appeal to some people. A side-effect is
>> reduced ability to catch errors, since the extra
>> redundancy of the ; helps with that.

To be honest, I have enough trouble with my manual parsing of the felix 
error messages, I'd prefer it not to be more complicated :(

>> Some syntax changes will be required, for example
>>
>> fun f()="" require fred
>>
>> would now be ambiguous, since it could mean either
>>
>> fun f()="" require fred; // or
>> fun f()=""; require fred;

I would choose the first if anything. Oh this reminds me, what about 
making the syntax between 'fun's, 'proc's, and 'gen's consistent, so 
that they're either all "keyword f()={}" or "keyword f() {}"? Oh, and 
maybe also allowing "(proc (x) => print x)" as an anonymous function as 
well.

Back on subject, what about "fun f() require fred =''"? It doesn't look 
good for small functions, but for large ones it makes sense:

fun f(x:int):int
  where complex_boolean
  requires fred
= {
...
}

rather than:

fun f(x:int)
  where complex_boolean
= {
...
} requires fred


>>
>> I'm thinking
>>
>> we require fred
>>
>> for the global version :)

For the module, we could do the whole "module M requires xyz = {}" as 
well. Not crazy about making "we" a keyword as well :)

-e

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to