As one who, as a beginning C++ programmer, discovered the bad error message g++ returns if you forget the trailing semicolon off of a class declaration, you definitely have my vote (on the general issue).
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.
Sounds o.k. to me. It may even make it easier to port programs between CR+LF and LF systems.
Personally I would use layout for the first version: For example: fun f() = "" require fred ORfun f() = "" require fred
Why is '|' ambiguous? For general match and case expressions, data constructors, etc. the general rule seems to be: (1) layout: fun f(x:u):int = match x with | Empty => 0 | Cons (_,?tail) => 1 + f tail endmatch ; (2) context: union X = | a | b | c
If you keep semicolons at all it asking for trouble to reuse a simple semicolon similar to OCaml's sequence operator. That is why OCaml terminates expressions with a double semicolon. One exception: if the _expression_ blocks where this semicolon-form is used were separate and visible (demarcated by enclosing parentheses), similar to the for( i = 0; i < N; i++) syntax of C/C++...
For the same reason you don't want to reuse a simple semicolon, you don't want to reuse the '|' (literally OR) operator from match and case blocks. You need another sequence operator for general expressions, although I'm not sure what it should be because I am too unfamiliar with what has been used so far. An arrow (->) won't work; Haskell uses a $ (whitespace-separated from all other tokens); Felix already uses f$ for special applications (I think)...
I don't know what you mean here. Are you talking about ordinary operations or special operations, such as threads? In any case reusing simple ';' and '|' are not specific enough. I would suggest keywords such as 'par' for parallel and 'seq' for sequential. For example: par proc 1 proc 2 end seq proc 1 proc 2 end (if you want semicolons to separate lines instead of line endings, both should have line endings.)
Just imagine that syntax containing a series of long expressions instead of " b | c ".
To match a pattern in a string, the syntax is: $string =~ /pattern/ -Pete |
------------------------------------------------------------------------- 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
