lua-users home
lua-l archive

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


On 03/09/2018 12:07, Dirk Laurie wrote:
Op Ma., 3 Sep. 2018 om 10:52 het Lorenzo Donati
<lorenzodonatibz@tiscali.it> geskryf:

On a related note, I was recently browsing source files for a game in
"The Battle for Wesnoth" open-source game engine (strategic, turn-based,
fantasy-oriented). It is scripted in Lua, but it uses a DSL (WML -
Wesnoth Markup Language) for campaign/scenarios definitions.

In one of the WML files of a user-defined campaign, inside a side AI
definition block I read the following line (and it was repeated in 2
other spots in the code):

aggresion = 1

That, of course, is a blatant spelling mistake, but was buried deep into
code written (quite well) by a probably non-English-speaking developer.

If a programmer uses the word "aggresion", it means precisely what the
Humpty Dumpty inside them chooses it to mean — neither more nor less.
There is no right or wrong here. The question is, which is to be
master — that's all.


Sorry for not being clearer: that configuration parameter was not a choice of the programmer, it was meant to be "aggression" as defined by the WML language (it is a parameter of the behavior of the AI).

So /it is/ a spelling mistake (that's why I used it as an example).

Here we have a difference between the programmer of the WML system (who chooses "keywords", i.e. field names in this case) vs. the programmer of the specific adventure game (who programs /in/ WML in order to define scenario settings and behavior).

BTW, actually "sulphur" is also a correct, alternative, Latin spelling. You just tickled my rusty "Latin brain" and so I run for my old and dusty Latin-Italian dictionary (Castiglioni-Mariotti).

I read from it that it was used in that form by Catullo and Lucrezio.

Since we are digressing, the origin of the dual spelling are intriguing. This document I just found might be interesting:

https://europepmc.org/backend/ptpmcrender.fcgi?accid=PMC1838885&blobtype=pdf


It's no more eccentric than the British insistence on the French
spelling "colour" and and the pseudo-Greek spelling "sulphur" despite
the fact that, as all good Americans know, those words come from Latin
and should therefore be spelled "color" and "sulfur".


Well, that's extreme nitpicking. :-)

As I hinted in my post, I dare say most programmers worldwide nowadays are not native English speakers, and I doubt many of them are aware of etymology of English words.


Come to think of it, "aggresion" may even be a word, formed from a
verb "aggrede" like "collision" is formed from "collide". Where's my
copy of the collected works of Sir Edmund Spenser?


In my experience reading code written by others, cases where the programmer was so sophisticated in choosing his identifiers versus the case it was a mere spelling mistake are 1 out of 20 (upper bound).


-- Dirk