18 July 2006
Build scripts and linguistics
In different types of languages, meaning can be represented to varying degrees through morphology or syntax. Meaning is expressed with morphology by, for example, adding "s" for plurals of nouns or "ed" for past participles of regular verbs. In this domain, morphemes are combined through declension and conjugation to generate word-forms with different meanings. Meaning is expressed with syntax by word order and subcategorization. For example: the determiners "the" or "a," when present, must be the first word in a noun phrase; the verb "sympathize" must subcategorize for a "with" clause. The lexical alterations of morphology are replaced with structural alterations of syntax.
At work, we've recently moved from Ant to Maven to manage our build process. Ant uses XML files to define build scripts that contain similar functionality to those of make files, declaring commands that define dependencies, create directories, or that compile and copy files. Although Ant build files are in XML format, they act basically as a procedural script. Maven also contains XML files, but they contain considerably less information and instead rely on a directory structure to define tasks. The presence or absence of a specific folder decides whether or not a standard build action will be executed on the contents of that folder.
The Ant language's imperative emphasis depends largely on morphology; Maven's structural emphasis depends largely on syntax. This is somewhat of an over-generalization but it is useful in understanding the different approaches, which can be jarring. Ant's tasks have structure that serve the same purpose as Maven's directories, yet the Ant tasks read more like word-forms and the Maven directories read more like subcategorization.
- Techniques after using Swift for a month posted by sstrader on 26 August 2015 at 11:41:51 PM
- Some thoughts on Ruby after finishing a week (minus one day) of training posted by sstrader on 15 December 2011 at 8:59:30 PM
- Links on the singleton pattern posted by sstrader on 9 December 2011 at 9:19:50 AM
- Phonebot posted by sstrader on 29 October 2011 at 6:37:05 PM
- The labeled break in Java posted by sstrader on 4 September 2011 at 11:27:56 AM