Arne Babenhauserheide:
> You might have noticed that after initial excitement I drew back from 
> readable again. The reasons were partly time problems, but mostly that I have 
> the feeling that readable currently moves into a direction which does not 
> feel right to me.

I'm sorry to hear that.  To be honest, I'm *delighted* with the current draft 
sweet-expression notation.

But discussing this alternative now sounds like a good idea, as long as we 
don't get stuck in an endless "analysis paralysis".

> There is now indentation based syntax (great!) with special casing for 
> sublists (useful for nested functions), restart lists (hm) and now <* ... *> 
> (looks alien).

The latter two are the same thing.  <*...*> is just the syntax for restart 
lists (now renamed to collection lists).

> To me this lost the beauty of lisp, that you have few fixed syntax rules 
> which become second nature. Instead we now have mixed metaphors and code 
> which can be written in a multitude of ways - which goes counter to 
> readability (it’s not about every special case being beautiful, but having a 
> consistent style which is nicely readable in most cases).

I definitely don't want to add an infinite amount of syntax, but the widespread 
rejection of Lisp shows that Lisp has gone too far on the "no syntax" extreme.  
Besides, anyone who says Scheme has no syntax has not tried to accurately parse 
Scheme numbers or identifiers :-).

> And it just felt wrong to see more and more special cases being added. That 
> smelled of a problem in the basic concept.

Sweet-expressions have a general rule, 3 special abbreviations for common 
circumstances ($, \\, and <*...*>), and neoteric-expressions.  I don't think 
that's much at all.  But a better approach, if it's actually better, is welcome.

> Also I wondered how code like the following would be represented:
>     (concat "I want " (getwish from me) " - " username)
> Currently I only see this option:
>     concat "I want " getwish(from me) " - " username
> But not this
>     concat "I want " 
>            getwish from me 
>            " - " username

Well, you can of course do:
! concat "I want " 
! ! getwish from me 
! ! " - "
! ! username

Or if you want to do it in 3 lines:
! concat "I want " 
! ! getwish from me 
! ! " - " \\ username

So that's trivially handled in the current draft.


> Essentially all it does is giving up the rule that a variable on its own is a 
> variable instead of a function call.

That side-effect is unfortunate. Using f() as a function call is pretty clear, 
and returning "1" as a value is clear too.  I fear this might lead to a lot 
lists being un-intentionally returned.  IE, the rule may be simple, but it 
would lead to a lot of mistakes in practice.  Having "f" on a line return f, 
and "f()" actually call f, is much clearer to me than ". f" to return f.  It's 
especially odd if the return value is a number like "5".

But let's discuss this alternative further...

--- David A. Wheeler

Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
Readable-discuss mailing list

Reply via email to