Let’s make a language – Part 4b: Nouns (Isian)

Keeping in our pattern of making Isian a fairly simple language, there’s not going to be a lot here about the conlang’s simple nouns. Of course, when we start constructing longer phrases (with adjectives and the like), things will get a little hairier.

Noun roots

Isian nouns can look like just about anything. They don’t have a set form, much like their English counterparts. But we can divide them into two broad classes based on the last letter of their root morphemes: vowel-stems and consonant-stems. There’s no difference in meaning between the two, and they really only differ in how plural forms are constructed, as we shall see.

Cases

For all intents and purposes, Isian nouns don’t mark case. We’ll get to pronouns in a later post, and they will have different case forms (again, similar to English), but the basic nouns themselves don’t change when they take different roles in a sentence.

The plural (with added gender)

The plural is where most of Isian’s noun morphology comes in. For consonant-stems, it’s pretty simple: the plural is always -i. From last week, we have the nouns sam “man” and talar “house”. The plurals, then, are sami “men” and talari “houses”. Not much else to it.

For vowel-stems, I’ve added a little complexity and “naturalism”. We have three different choices for a plural suffix. (This shouldn’t be too strange for English speakers, as we’ve got “-s”, “-es”, and oddities like “-en” in “oxen”.) So the possibilities are:

  • -t: This will be the most common marker. If all else fails, we’ll use it. An example might be seca “sword”; plural secat.

  • -s: For vowel-stems whose last consonant is a t or d, the plural becomes -s. (We’ll say it’s from some historical sound change.) Example: deta “cup”; plural detas.

  • -r: This one is almost totally irregular. Mostly, it’ll be on “feminine” nouns; we’ll justify this by saying it’s the remnant of a proper gender distinction in Ancient Isian. An example: mati “mother”; matir “mothers”.

As we go along, I’ll point out any nouns that deviate from the usual -i or -t.

Articles

Like English, Isian has an indefinite article, similar to “a/an”, that appears before a noun. Unlike the one in English, Isian’s is always the same: ta. It’s never stressed, so the vowel isn’t really distinct; it would sound more like “tuh”.

We can use the indefinite when we’re talking about one or more of a noun, but not any specific instances: ta sam “a man”; ta hut “some dogs”. (Note that we can also use it with plurals, which is something “a/an” can’t do.)

The counterpart is the definite article, like English the. Isian has not one but two of these, a singular and a plural. The singular form is e, and the plural is es; both are always stressed.

These are used when we’re talking about specific, identifiable nouns: e sam “the man”; es sami “the men”.

More words

That’s all there really is to it, at least as far as the basic noun structure. Sure, it’ll get a lot more complicated once we through in adjectives and relative clauses and such, but we’ve got a good start here. So, here’s a few more nouns, all of which follow the rules set out in this post:

  • madi “mother” (pl. madir)
  • pado “father” (pl. pados)
  • shes “woman”
  • tay “child” (pl. tays)
  • chaley “friend”
  • gol “head”
  • bis “eye”
  • ula “mouth”
  • fesh “hand”
  • pusca “foot”
  • her “cat”
  • atul “flower”
  • seca “sword”
  • deta “cup” (pl. detas)
  • jeda “shirt” (pl. jedas)

ES6 iterators and generators

With ES6, JavaScript now has much better support for iteration. Before, all we had to work with was the usual for loop, either as a C-style loop or the property-based for...in. Then we got the functional programming tools for arrays: forEach, map, reduce, and so on. Now we have even more options that can save us from needing an error-prone C-style loop or the cumbersome for...in.

The new loop

ES6 adds a new subtype of for loop: for...of. At first glance, it looks almost exactly the same as for...in, but it has one very important difference: for...in works on property names, while for...of loops over property values. Prettified JavaScript variants (like CoffeeScript) have had this for years, but now it comes to the base language, and we get to do things like this:

var vowels = ['a','e','i','o','u','y'];

for (var v of vowels) {
    if (v != 'y') {
        console.log(v);
    } else {
        if (Math.random() < 0.5) {
            console.log("and sometimes " + v);
        }
    }
}

Most developers will, at first, use for...of to iterate through arrays, and it excels at that. Just giving the value in each iteration, instead of the index, will save the sanity of thousands of JavaScript programmers. And it’s a good substitute for Array.forEach() for those of you that don’t like the FP style of coding.

But for...of isn’t just for arrays. It works on other objects, too. For strings, it gives you each character (properly supporting Unicode, thanks to other ES6 updates), and the new Map and Set objects work in the way you’d expect (i.e., each entry, but in no particular order). Even better, you can write your own classes to support the new loop, because it can work with anything that uses the new iterable protocol.

Iterables

Protocols are technically a new addition to ES6. They lurked behind the scenes in ES5, but they were out of sight of programmers. Now, though, they’re front and center, and the iterable protocol is one such example.

If you’ve ever written code in Java, C#, C++, Python, or even TypeScript, then you already have a good idea of what a protocol entails. It’s an interface. An object conforms to a protocol if it (or some other object up its prototype chain) properly implements the protocol’s methods. That’s all there is to it.

The iterable protocol is almost too easy. For a custom iterable object, all you need to do is implement a method called @@iterator that returns an object that meets the iterator protocol.

Okay, I know you’re thinking, “How do I make a @@iterator method? I can’t use at-signs in names!” And you’re right. You can’t, and they don’t even want you to try. @@iterator is a special method name that basically means “a symbol with the name of iterator“.

So now we need to know what a symbol is. In ES6, it’s a new data type that we can use as a property identifier. There’s a lot of info about creating your own symbols out there, but we don’t actually need that for the iterable protocol. Instead, we can use a special symbol that comes built-in: Symbol.iterator. We can use it like this:

var myIterable = {
    [Symbol.iterator]: function() {
        // return an iterator object
    }
}

The square brackets mean we’re using a symbol as the name of the property, and Symbol.iterator internally converts to @@iterator, which is exactly what we need.

Iterators

That gets us halfway to a proper iterable, but now we need to create an object that conforms to the iterator protocol. That’s not that hard. The protocol only requires one method, next(), which must be callable without arguments. It returns another object that has two properties:

  • value: Whatever value the iterator wants to return. This can be a string, number, object, or anything you like. Internally, String returns each character, Array each successive value, and so on.

  • done: A boolean that states whether the iterator has reached the end of its sequence. If it’s true, then value becomes the return value of the whole iterator. Setting it to false is saying that you can keep getting more out of the iterator.

So, by implementing a single method, we can make any kind of sequence, like this:

var evens = function(limit) {
    return {
        [Symbol.iterator]: function() {
            var nextValue = 0;
            return {
                next: function() {
                    nextValue += 2;
                    return { done: nextValue > limit, value: nextValue };
                }
            }
        }
    }
}

for (var e of evens(20)) {
    console.log(e);
} // prints 2, 4, 6..., each on its own line

This is a toy example, but it shows the general layout of an iterable. It’s a great idea, and it’s very reminiscent of Python’s iteration support, but it’s not without its flaws. Mainly, just look at it. We have to go three objects deep to actually get to a return value. With ES6’s shorthand object literals, that’s a bit simplified, but it’s still unnecessary clutter.

Generators

Enter the generator. Another new addition to ES6, generators are special functions that give us most of the power of iterators with much cleaner syntax. To make a function that’s a generator, in fact, we only need to make two changes.

First, generators are defined as function*, not the usual function. The added star indicates a generator definition, and it can be used for function statements and expressions.

Second, generators don’t return like normal functions. Instead, they yield a value. The new yield keyword works just like its Python equivalent, immediately returning a value but “saving” their position. The next time the generator is called, it picks up right where it left off, immediately after the yield that ended it. You can have multiple yield statements, and they will be executed in order, one for each time you call the function:

function* threeYields() {
    yield "foo";
    yield "bar";
    yield "The End";
}

var gen = threeYields();

gen.next().value; // returns "foo"
gen.next().value; // returns "bar"
gen.next().value; // returns "The End"
gen.next().value; // undefined

You can also use a loop in your generators, giving us an easier way of writing our evens function above:

var evens = function(limit) {
    return {
        [Symbol.iterator]: function*() {
            var nextValue = 0;
            while (nextValue < limit) {
                nextValue += 2;
                yield nextValue;
            }
        }
    }
}

It’s still a little too deep, but it’s better than writing it all yourself.

Conclusion

Generators, iterators, and the for...of loop all have a common goal: to make it easier to work with sequences. With these new tools, we can now use a sequence as the sequence itself, getting its values as we need them instead of loading the whole thing into memory at once. This lazy loading is common in FP languages like Haskell, and it’s found its way into others like Python, but it’s new to JavaScript, and it will take some getting used to. But it allows a new way of programming. We can even have infinite sequences, which would have been impossible before now.

Iterators encapsulate state, meaning that generators can replace the old pattern of defining state variables and returning an IIFE that closes over them. (For a game-specific example, think of random number generators. These can now actually be generators.) Coroutines and async programming are two other areas where generators come into play, and a lot of people are already working on this kind of stuff. Looking ahead, there’s a very early ES7 proposal to add comprehensions, and these would be able to use generators, too.

Like most other ES6 features, these aren’t usable by everyone, at least not yet. Firefox and Chrome currently have most of the spec, while the others pretty much have nothing at all. For now, you’ll need to use something like Babel if you need to support all browsers, but it’s almost worth it.

Faith and fantasy

Religion is one of those things that, as an author or game designer, you have to treat very carefully. The risk of offense is too great, especially in the politically-correct, offense-first world of today. It’s easy to fall into a trap of pigeonholing real-world religions. “Evil, Arabian-looking bad guys that act like Muslims” is practically a genre trope at this point; two examples that I’ve read include the Fanim of R. Scott Bakker’s Prince of Nothing trilogy and the Krasians of Peter V. Brett’s Demon Cycle. “Evil, hierarchical church that looks Roman Catholic” isn’t exactly uncommon, either.

But that’s not really the subject of this post. Sure, the popular religions in the world are the way they are, and they’re easy to relate to, easy to understand, because we see them every day. But different cultures, especially in different worlds than our own, are going to have different ways of looking at religion, faith, philosophy, and the supernatural. And their beliefs will shape their society, just as ours, historically, have shaped our own.

Of God and gods

In the West, there are three major religions: Christianity, Judaism, and Islam. In addition, there are a number of others that have significantly less popular appeal. The East, conversely, gives us the trio of Hinduism, Buddhism, and Shinto, along with a host of minor faiths. (And by “minor”, I mean they have fewer followers, not that they’re less important or less valuable.) And, of course, we also have the “non-religions” of atheism and agnosticism, as well as a number of systems of belief that might better be grouped under “philosophy”.

Even the largest of religions is not monolithic, however. Christianity has a whole spectrum of sects (“denominations”), and many Americans have become familiar with the major divisions of Islam (Sunni and Shia). Some can even spot the difference between some of the different sects of modern Judaism (Orthodox, Reform, etc.). We know comparatively far less about the other side of the world, though; most people in the US probably think of all Buddhists as Zen, for example.

In fantasy literature, religion—when it is mentioned at all—usually only gets a passing nod. There might be the occasional oath, prayer, or swear, but a story where the beliefs of the people are not the focus often ignores those beliefs. And that’s fine. If it’s not an important worldbuilding detail, then there’s probably not much reason to put it in.

Conversely, games, especially tabletop role-playing games, make religion an integral part of the story. D&D (and its offshoots, like Pathfinder) has lists of deities, each with their own domain, and these almost always function like the pantheons of old, except with added benefits for certain believers. (In D&D, for example, clerics and paladins usually must follow a deity, and they receive divine blessings and spells in return.) In a way, despite there being a very detailed summary of religion, it’s abstracted away into a game mechanic.

And again, there’s nothing wrong with that. Players shouldn’t be forced to study theology just to play a game. But fantasy, both literature and gaming, has a problem understanding the link between religion and society, and that link was a very real, very important part of the period of history favored by fantasy.

One to many

We all know the “origin stories” of the major Western religions, whether creation, crucifixion, or revelation. But all of these, as well as those less-familiar faiths of the world, had a major impact on the development of society. The Middle Ages, that favorite era of fantasy literature and games alike, was shaped by religion. In many ways, you could even say it was defined by religion.

When fantasy posits a pantheon (like D&D), that actually breaks the world for their other main assumption: the feudal monarchy. Feudalism, serfdom, the divine right of kings, knighthood, and all those other conceits of medieval Europe are based on a thousand years of Christianity.

“The end is coming soon, so get ready,” goes the common Christian refrain, and that’s largely been true since the 30s. No, not the 1930s, but the 30s, as in 30 AD. Christianity has always had a strain of the apocalyptic—the last book of the Bible is, after all, supposed to be a vision of the End of Days—though it has waxed and waned through the ages. In the medieval period, it was mostly waxing. Plague, famine, pestilence, and war were facts of life, especially for the lower classes, and there wasn’t much they could do about it. “The meek shall inherit the earth” was the closest thing to hope for the future that many people had.

If you replace the strict belief in God (whose eternal good was countered by the increasing influence of the Devil) with a nebulous—if effectual—pantheon, then things change dramatically. Get rid of the Church, the Pope, and all the other trappings of medieval Christianity, and all of society will develop differently.

Changing the game

In medieval Europe, the Church had supreme power, and all of it was centered on the Pope. He could make kings (or break them), crown emperors, canonize martyrs, or call crusades. His announcements of doctrine, the papal bulls, were regarded as nothing less than official interpretations of scripture. And he had one ultimate, terrifying weapon: excommunication.

All that it did was ban a person or group of people from Communion, effectively ostracizing them from the Church. But in a world where the eternal soul was seen as infinitely more important than its mortal frame, this was enough to turn even the most hardened of hearts. Rebels, heretics, willful kings, and political enemies all faced the threat of excommunication, and almost every one of them quailed in the face of such a punishment. Rebellions could end entirely once word came from Rome that their leaders had been cast out of the Church, no longer able to receive the blessings of Christ and thus condemned to Hell for all eternity. Even whole cities (such as Florence) were put under that threat simply to scare their rulers into complying with the Church’s wishes or dogma.

Besides the Church’s chief weapon (I’ll spare you the Monty Python jokes) and its total control of doctrine, it also changed Europe by bringing in its own social structure. Monasteries, hermitages, nunneries, convents, and abbeys all had their roles to play, and they were all part of the Church. And these weren’t always what you’d think from movies. Monks could be rich, nuns literate, and hermits not always loners living in caves. One of them even got elected as pope: Celestine V, who quit after a few months. (Every other pope from 1294 onwards ruled until he died or was cast out, until Benedict XVI not long ago.)

The Christian church and faith was the single largest influence on the development of the Middle Ages. Because of it, the Black Death was asserted as a sign of coming Armageddon, as was the famine that preceded it, and the Mongol horde that may have brought it. Without the church, the culture of monasticism wouldn’t have been so prevalent, nor would the orders of crusading knighthood, such as the Templars, Hospitallers, and the Teutonic Order exist.

Indeed, even the period’s systems of economy and government are indebted to Christianity. Feudalism lasted as long as it did mostly because people were taught that it was the natural order of things. Serfs were born to be serfs, and nobles to be nobles, and there were shelves full of books explaining all the ways you could see how that was true. Nobles, for instance, were taller, heavier, and healthier. Nobody bothered to note that this was because of nutrition and the often harsh working conditions of the peasantry. Rather, it was taken as part of the divine plan.

The realm of fiction

Fantasy likes to take the feudal society of Europe (especially the later, post-plague society where feudalism began to falter) and make it its own, without taking along the religious aspect that made it possible. In essence, you could say that medieval, feudal Europe came about because of Constantine, the emperor of Rome who converted himself and then his empire to Christianity.

Without a strong, central Church, you lose most of the foundations of the setting. If every city or nation can make its own doctrine, then you have very little world unity and shared culture. With more than one deity to worship, with no fixed scripture proclaiming the end of the world and the promise of a utopic afterlife, then there is no motivation for serfdom, for the glory of crusade.

Even technology is affected by the change in faith. Cathedrals, the defining monument of the Middle Ages, were built because of religion. Sure, a polytheistic culture might build great temples, and they would likely come to many of the same discoveries about building, but would they have the same styles? Likely not. They certainly wouldn’t be laid out in the shape of a cross, like the European cathedrals.

Some areas might become more advanced if you lift the strictures of Christianity. Machinery that could aid in work was often overlooked, simply because there were always more laborers to throw at a problem. The science of astronomy was held back by the belief that the stars were the realm of God, thus unknowable to man. And how would banking develop if the Christian constraints on usury didn’t exist to create a niche (and a stereotype) filled by Jews?

Magic, of course, is an obvious addition to any fantasy world, but it also existed (not really, but in people’s minds) in the Middle Ages. It’s something that was well-known, but totally forbidden. Fireball-wielding mages would have to be fit into the religious world-view, and where would they go? The sorcerers of the aforementioned Prince of Nothing series are excommunicated by default, but it’s easy to imagine a setting where the wizards are seen as messengers or even avatars of God or the gods.

Like so many other topics in worldbuilding, a few decisions change the outcome completely. Monotheism, logically speaking, probably leads to one of the same outcomes as it did in our world. Polytheism is reflected in ancient Rome and even modern India, as well as most fantasy. A lot of other ideas require more thought. If God is everywhere, in everything, then who needs temples or churches? If the world is full of spirits that inhabit every living thing, how can you eat and still live with yourself? (Yes, that means an animist world could have even stricter dietary laws than Islam. Think of Hinduism’s sacred cows.)

The length of time that a religion has existed will also play a role in a society’s development. The older something is, the more likely it is to change. Faiths fracture, sectarianism grows, especially if there is no central authority. A polytheistic culture is prone to develop “local” gods; Athena, patron of Athens, is a good example. New religions exist in a state of flux, as everyone vies for the right to be considered orthodox, often with disastrous consequences for those that lose. (How many Gnostics do you know?)

Rituals, prayers, and even the calendar can also be affected. The word “holiday” literally means “holy day”, and that’s where the oldest of them come from. Christmas and Easter are the ones everybody knows, although few know that they’re replacements for “pagan” holidays celebrating the winter solstice and the vernal equinox. But Lent and Ash Wednesday were far more important in the Middle Ages. All Saints’ Day, another pagan substitution, has become so marginalized that we celebrate the night before it instead: Halloween. Different religions, though, will have their own holy times: Ramadan, Hanukkah, and so on. As for prayers, who do you pray to when you have a hundred gods to choose from? Who is the one to memorize all the appropriate rituals?

End of this day

As always, there’s a lot to think about, and your choice is one of how deep to go. Obviously, if religion isn’t a major part of your world, then there’s not too much you have to do. But religion might be a significant part of your characters’ world, and it might show in the way they act, think, talk.

Faith and logic don’t always have a lot in common, it’s true. This is one place where the latter makes the former possible. It’s not your faith you’re worried about. Presumably, you’ve already decided that, and it shouldn’t have any bearing on your created world. Logically working out the beliefs of your world and their effects, though, can make for a deeper immersion into your story. It might even make some people think.