[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BRL (was Re: XML as a transition to s-expr)



kragen@pobox.com writes:

> That's not too bad.  It'd probably be more readable if it were written
> like this, though:
> 
> [(mail (list "nobody@example.com")]
> To: nobody@example.com
> Subject: [name] is [age]
[...]

This works in the latest release.  Leading whitespace before the first
header is now trimmed.

> Or possibly with the whole thing indented to match surrounding code:
>     [(mail (list "nobody@example.com")]
>     To: nobody@example.com
>     Subject: [name] is [age]
[...]

Interesting idea, but there might be some gotchas.

> Do you think this kind of tidying is something that would occur to a
> newbie?  If you run my tidied versions, do they work?  (Having written
> a few RFC-822 messages and message parsers, I suspect not.) If not,
> what kind of diagnostics does it give you?

I do think newbies might try something like that.  The message would go
through, but the headers would look messed up.  There's probably more I
could do to catch such situations.

> > What if they want a literal double quote in the body of the e-mail?
> > PHP requires backslashing.  BRL does not.  Typical alt.php question.
> 
> What if they want a literal left square bracket [ in the body of the
> e-mail?  How do you accommodate that without some variant of
> backslashing?  (I understand that square brackets are less common in
> HTML than double quotes!)

You write [[ to escape it.  With quote/backslash, you now have two
characters that need escaping.

> > Do the dollar signs, backslashes, commas and semicolons in PHP
> > really help make things more readable?
> 
> I'm not going to claim that PHP is readable.  Nosirree.  But the
> difference between commas and semicolons often makes programs in
> general more readable, because your eye can locally distinguish
> creating a list of values with commas from running a sequence of
> statements with semicolons.

To buy that one, I'd have to see some Scheme or Lisp code that was hard
to distinguish.


-- 
<brlewis@[(if (brl-related? message)    ; Bruce R. Lewis
              "users.sourceforge.net"   ; http://brl.sourceforge.net/
              "alum.mit.edu")]>