Re: Parenthesized Target Notation

"Richard A. O'Keefe" <[email protected]>
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
Ian Elliott <[email protected]> wrote:
	So no one appears to like the (|..|) parentheses (they remind me
	a little of hamburger buns) that the ECMA Eiffel standard
	specifies but I cannot help feeling that the attempt to remove
	special cases from the language by reducing a rule from "A
	semicolon is optional, except..." to "A semicolon is optional."
	is a laudable aim:  special cases complicate things - just look
	at the number of postings the pesky little ";" has generated.

I agree that trying to remove special cases from a language is a laudable.
But a failed attempt to do so is still a *failed* attempt, and it is not
laudable to adopt a failed attempt in a standard.

In this case, what has resulted is that yet another special case has
been *added*, without actually solving the general problem.  What's needed
is a *general* solution, and when we have it, there will be no need for
barred parentheses.
	
I suspect that a rule along the lines of 'if the syntax would allow a
semicolon at the end of a line, act as if there was a semicolon there'
would do the least damage.  Within an expression, a semicolon is not
allowed between (...) or [...] or {...} or after an operator, so

    invariant
        (a			-- no semicolon here
         - b) < c
	a			-- semicolon here
	- b < c	
	f			-- semicolon here
	(x+1).g
	f(			-- no semicolon here
	 x+1).g
	x <			-- no semicolon here
	    y

The current syntax allows semicolons to be omitted anywhere, but
the style rules say only to do this at the end of a line, so nicely written
Eiffel code shouldn't really notice the change if the style rule were
enforced.

At least this rule is the right *kind* of attempt in that it directly
addresses the real problem (missing semicolons) rather than one (out of
several) symptoms of the problem.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.