Grammar for computer geeks

Grammar is one of those things you discover when learning a second language, even though you were using it with you first. Like many abstract way of thinking about stuff, you can live without, but it makes discussing stuff much easier. Instead of explaining those concepts using words, I’m going to explain them using C function pointers.

Transitive Verbs

They are functions that take two parameters, a subject and an object, like for instance the verb to beat. The first defines who does the action, the second defines what the action affects.

typedef void (*transitive_verb)(Object*, Object*);

Intransitive verbs

They are functions that take only one parameter, a subject, like for instance the verb to die.

typedef void (*intransitive_verb)(Object*);

Ambitransitive verbs

They are functions that can have both a transitive and an intransitive form, like for instance the verb to eat.

Liked it? Take a second to support Thias on Patreon!

Flattr this!

Leave a Reply