[WikiEN-l] MediaWiki is getting a new programming language

Neil Harris usenet at tonal.clara.co.uk
Mon Jul 6 19:28:23 UTC 2009


> In a message dated 7/6/2009 3:54:38 AM Pacific Daylight Time, 
> usenet at tonal.clara.co.uk writes:
> 
> 
>> Although the point could have been put more tactfully, I think the 
>> salient point here is that "English-like" programming languages have 
>> been tried before many times, and have (with the possible exception of 
>> COBOL) consistently been rejected in favour of compact equation-like 
>> languages.>>
> 
> -------------------------
> 
> Neil let me just point out in counter-point that the two longest-living 
> third-generation langages, COBOL and BASIC are both still alive and well. 
> 
> Both use a most English-like foundation.
> 
> 
>  Is Python more represented in want-ads ?  Most businesses still use older 
> generation languages, regardless of what is being taught in university.
> 
> Will Johnson

The reason why COBOL and SQL endure isn't their English-like syntax, 
which is a relic of the era in which they were designed, but because 
they were the first just-good-enough systems of their type.

The same is true of C, which is an appallingly badly designed language 
by modern standards; but endures for the same reasons; familiarity, 
backwards compatibility and the widespread availability of trained 
programmers. But in its time, C was a _vast_ improvement over assembler, 
which is what it existed to replace.

[Regarding want ads: granted, there are billions of lines of COBOL and 
BASIC code out there in the business world, but how many new projects do 
you see being created in COBOL or BASIC, and how many job ads for COBOL 
and BASIC programmers? http://langpop.com/ has a pretty good survey of 
what's actually used in the wider world. Gnomic ALGOL-esque languages 
like C, Java C++ and PHP lead the pack.]

The MediaWiki template language survives for the same reason. This is 
not to say that it's perfect, or even very good: but it works, has a 
large installed base of legacy code, and general availability of the 
appropriate skills in the existing base of "programmers", and is just 
good enough to serve its purpose, and therefore survives on for the same 
reasons as above.

Given the large installed base of existing template code, I believe it 
would a much better idea to start with the template language we 
currently have, and clean it up incrementally, than it would be to 
rewrite it from scratch and risk second system syndrome.

Fortunately, it's (necessarily) machine-parsable, and it shouldn't be an 
insuperable task to clean up the syntax whilst still running alongside 
the old code, and remaining (mostly) backwards compatible. If this is 
done in stages, the current template coder base should learn the new 
syntax in parallel with the changes, and the new syntax should be much 
easier for new template programmers to learn.

This has actually been done twice before: once with the creation of 
proper conditionals and the retirement of {{qif}}, and a second time 
with a subtle change in the semantics of the template system to make it 
faster and easier to parse and run.

Perhaps the next move should be the replacement of {{{name|default}}} 
with something like ${name|default}, with $name as a short form for the 
common case?

-- Neil




More information about the WikiEN-l mailing list