Slide 1

Slide 1 text

Economy and Expressivity in Artificial Languages Sunday, 10 March 13

Slide 2

Slide 2 text

Damon Davison Soware Developer at New Bamboo [email protected] @allolex Sunday, 10 March 13

Slide 3

Slide 3 text

Natural languages are in a state of constant evolution. Speakers are constantly negotiating between Economy and Expressivity in everying ey say. Wi an artificial language, its designers decide e language’s Economy and Expressivity up front. Sunday, 10 March 13

Slide 4

Slide 4 text

Economy and Expressivity They’re terms from Linguistics. Sunday, 10 March 13

Slide 5

Slide 5 text

Economy ✦ Bias toward efficient processing wiout regard to meaning. ✦ Examples: ✦ It’s a fact, isn’t it? ➙ It’s a fact, innit? ✦ You had beer recognize it. ➙ You beer recognize. ✦ Berkshire Hunt ➙ Berk ✦ Coffeescript: elimination of ternary operator Sunday, 10 March 13

Slide 6

Slide 6 text

Expressivity ✦ Bias toward richness in meaning wiout regard for efficiency in processing. ✦ Examples: ✦ Synonyms for “vomit” in English. (Count em!) ✦ Perl: ++$count; $count++ ✦ Ruby: ternary vs case/switch vs if...elsif...else vs nested if...else ✦ Ruby: yield Sunday, 10 March 13

Slide 7

Slide 7 text

Economy Expressivity Economy and Expressivity Continuum Sunday, 10 March 13

Slide 8

Slide 8 text

Economy Expressivity Economy and Expressivity Grammaticalisation and Lexicalisation syntax (grammar) lexicon (dictionary) Sunday, 10 March 13

Slide 9

Slide 9 text

Grammaticalisation You need to tie two concepts togeer, and use existing words to do at. hād ‘state/quality’ (Old English) -hood e.g. motherhood Sunday, 10 March 13

Slide 10

Slide 10 text

Grammaticalisation Phonological and Graphological Reduction Bill is going to go to college. Bill’s gonna go to college. else if elsif Sunday, 10 March 13

Slide 11

Slide 11 text

Grammaticalisation Phonological and Graphological Reduction Bill is going to go to college. Bill’s gonna go to college. else if elsif But adding a new keyword is Expressivity. Sunday, 10 March 13

Slide 12

Slide 12 text

yak shaving Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem Lexicalisation You have an concept and you find a way to express it. This is basically what keywords are. Sunday, 10 March 13

Slide 13

Slide 13 text

Economy Expressivity Economy and Expressivity Effects in Programming Languages few choices easier to learn many choices hard to learn Sunday, 10 March 13

Slide 14

Slide 14 text

Economy Expressivity Economy and Expressivity Ruby and Perl few choices easier to learn many choices hard to learn Most programming languages Ruby Perl Sunday, 10 March 13

Slide 15

Slide 15 text

Economy Expressivity Economy and Expressivity “The Big Four” dynamic languages *Pyon Ruby Perl *PHP Sunday, 10 March 13

Slide 16

Slide 16 text

Economy Expressivity Economy and Expressivity *Pyon Ruby Perl *PHP "There should be one—and preferably only one—obvious way to do it." (The Zen of Pyon) This way lies Chaos. “BDSM” languages There’s more an one way to do it (TMTOWTDI) Sunday, 10 March 13

Slide 17

Slide 17 text

Coding by convention Convention overlays a kind of voluntary grammar to push a language toward Economy on e continuum. Rubyists know is from Ruby on Rails’ “convention over configuration” I haven’t been able to find anying developers in more economical languages can do to make eir code more expressive except to write more of it. Sunday, 10 March 13

Slide 18

Slide 18 text

Thanks to D. Anderson at e Cambridge University for e handout I used to provide more English examples: hp://www.ling.cam.ac.uk/li7⁄grammatical_da.pdf “Yak shaving” definition from Wikipedia. All my colleagues at New Bamboo for eir constructive criticism of earlier versions of is talk. @allolex Sunday, 10 March 13