Programmers whos first language is not English

Mike Meyer mwm at mired.org
Sat Mar 8 11:50:25 EST 2003


"John Roth" <johnroth at ameritech.net> writes:
> "Stephen Horne" <intentionally at blank.co.uk> wrote in message
> news:74ij6vcebl67dto60dun42hd625qrkmcv7 at 4ax.com...
> > In particular, I'm thinking of using XML - not as an AST
> > representation, but merely as a way of marking up source code. This
> > would require special editors, of course, but if WYSIWYG editors can
> > be created for HTML I don't see why programmers are still stuck in the
> > plaintext age.
> I've got two reactions to this. First, I personally consider XML to be
> a horrible idea for source code.

Having written code in XML, I'll agree 100%. Even using an XML-aware
editor doesn't make this anything I'd call workable. I'd rather use
something like CSV.

> On the other hand, I do consider that special marks for different
> name spaces are the way to go. If you can pick out keywords, globals
> and module level names in independent name spaces, then most of the
> obdurate problems with evolving Python go away.
> 
> I also agree with your point about getting away from being stuck in
> the plain text era.

I have two reactions to that. One is that I'm not stuck in plaintext -
my python code gets colored keywords, strings and other such
niceties. When I print it in black and white, I get bold and italic.

The other reaction is that having programs in flat text files means we
can use all the neat tools that exist for dealing with flat text -
like smart editors, grep, sed, and so on. XML is probably the
high-level syntactic form that has the most tools, but I'm not sure
it's to a state to compete with flat text yet.


> > One possible use of XML might be that 'keywords' and 'symbols' could
> > be stored as XML elements specifying non-language-specific tokens -
> > the editor could have a local language table to recognise keywords as
> > the programmer types (or could use hotkeys to insert whole keywords
> > Speccy-style) and could present them on screen with colour
> > highlighting. This would require little (if any) more work than
> > existing syntax-highlighting editors.
> Exactly. If you're going to have some mechanism to pick out keywords,
> then the editor should present them in the vocabulary appropriate to
> the person at the keyboard.

Another possibility is to have a local XSLT file that transforms the
program into a canonical form to feed to the compiler. Another to
translate from the canonical form back to the local form would be
useful. You might be able use an XSL document to drive the editor,
thus seperating Hmm. Maybe XML is farther along than I thought.

> > I'm quite curious what other people think about this kind of idea -
> > particularly people whose first language is not English.
> I think parts of it are the way programming language is headed anyway.

I'm not in your particular target audience, but I think it has some
promise. Parts of it are clearly in the future. Others might not be,
but are certainly worth investigating.

        <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.




More information about the Python-list mailing list