OT: Programmers whos first language is not English

Stephen Horne intentionally at blank.co.uk
Mon Mar 10 05:43:19 EST 2003


On Mon, 10 Mar 2003 17:03:42 +1300, Paul Foley <see at below.invalid>
wrote:

>On Sun, 09 Mar 2003 21:57:51 +0000, Stephen Horne wrote:
>
>> Of course XML isn't a friendly language either, but the programmer
>> looking at his editor is not supposed to see XML.
>
>But you're proposing to make him use a special editor anyway, so it's
>no harder (and rather a lot easier, in fact) to make that editor read
>and write Lisp (or at least something Lisp-like) rather than blecherous
>XML, and present _exactly the same_ view to the user as you would with
>your XML monstrosity.

1.  I don't need to write an XML parser - people have already
    packaged them up in APIs ready to use. That makes writing the
    editor in particular easier, and means that the compiler or
    interpreter only has to handle one level of parsing.

2.  These parsers already handle character set conversion - I don't
    need to worry about ASCII, UTF-8, etc as that's the XML parsers
    job.

3.  In reality, XML need be no more complex than LISP-style
    parenthesised expressions. Remember, I'm proposing a marked-up
    text source code, having rejected the virtual AST version. That
    means the bulk of the 'code' will be plain text embedded in XML.
    XML provides a clear distinction between markup and text which
    LISP does not - the end result would be that an equivalent in LISP
    would need quoted strings for the text and would end up just as
    complex as XML.

    Let's compare...

      (def) " " (id "test") " (" (id "x") ")"
      (indent
        (print) (lit-str "x squared is : ") "," (id "x") (mul) (id
"x")
      )

    with...

      <def/> <id>test</id> (<id>x</id>)
      <indent>
        <print/> <lit-str>x squared is : </lit-str>, <id>x</id> <mul/>
<id>x</id>
      </indent>

    There's really not much to choose between them, but I prefer the
    latter overall.





More information about the Python-list mailing list