Re: Square brackets?



"Alex Shinn" <alexshinn@xxxxxxxxx> writes:

Anton van Straaten wrote:

Indeed. Besides, the true Schemer ought to be able to see past a
program's textual representation, to the Platonic perfection of the
abstract syntax, which is unaffected by which character set happens to
have been used to serialize the program.

Indeed. I was under the impression that any experienced Schemer
doesn't even see parentheses, but looks solely at the indentation.
At least this is the argument often given to people complaining
about all of Lisp's Irritating Silly Parentheses.

But by this reasoning the brackets are just needless syntactic
sugar. Or possibly worse - my eyes glaze over parentheses without
registering them, but I find it harder to ignore mixed parens and
brackets since it's not uniform.

In a language that prizes minimalism you need a very good argument
to include syntactic sugar, and especially so if many people disagree
as to whether that syntax even makes things any easier to read.

The only advantage I can see for square brackets is it can be less
confusing for rank beginners. The vast majority of beginners are
confused by LET and COND groupings, and using brackets can help them
remember the right syntax. And having a strong history as a
teaching language, we shouldn't ignore beginners. But to me this
still isn't a strong enough reason to add controversial syntax.

As you explain above, mixing brackets and parethenses is hard on the
eyes. I'm not sure it's a favor we're doing to the beginners
proposing them these brackets. I agree that it may be helpful to make
the structure stand out more clearly for beginners, but this is the
IDE should do, not the language itself. The IDE can display external
parentheses in a bigger font than the internal ones, or can use colors
to match open and close parentheses. This would really be helpful to
newbies and let them become proficient faster, IMO, than mixing
brackets and parentheses.

--
__Pascal Bourguignon__ http://www.informatimago.com/
You never feed me.
Perhaps I'll sleep on your face.
That will sure show you.
.



Relevant Pages

  • Re: Square brackets?
    ... the true Schemer ought to be able to see past a ... But by this reasoning the brackets are just needless syntactic ... as to whether that syntax even makes things any easier to read. ... The vast majority of beginners are ...
    (comp.lang.scheme)
  • RE: Required field on form
    ... parentheses when calling it; if its called as an event property of a control ... is the same as an Access reserved word has to have the brackets so Access ... The parenthesis enclose the arguments of the IsNull function. ... The field which needs to be mandatory is called "Date Received". ...
    (microsoft.public.access.gettingstarted)
  • Re: Buggy SQL Syntax for External File Path in Access 2007
    ... Parentheses around the sub-select are turned into square brackets ... AS Alias is Jet SQL's syntax for derived tables. ... One option you might consider is setting your database to use ANSI ... 92 SQL, which will mean that you can use the standard AS Alias ...
    (microsoft.public.access.modulesdaovba)
  • Re: English-like Python
    ... interpretation of a typical statement without its parentheses. ... CurrentTime) ... But even if RB doesn't have these things, I question that the syntax is ... "beautiful". ...
    (comp.lang.python)
  • Re: Casting the return value of malloc()...
    ... Most arguments to sizeof do not require parentheses. ... Why should it need any further name than "part of the syntax?" ... Depending on context, it may specify an operation to be ... See, punctuators can be operators, but the set of operators is broader. ...
    (comp.lang.c)

Loading