|
| 1 | +# "Ousterhout's Dichotomy Isn't (Part 2 of the Simplicity/Power/Focus Series)", Stuart Halloway # |
| 2 | + |
| 3 | +## Simplicity, Power, Focus ## |
| 4 | + * Last year, Simplicity |
| 5 | + * This year, Power |
| 6 | + * Next year? |
| 7 | + |
| 8 | +## Power ## |
| 9 | + * Definition: to be able |
| 10 | + * Would be nice to give context to that |
| 11 | + * What about physics? |
| 12 | + * `P = IV` |
| 13 | + * `P = dW/dt` |
| 14 | + * the amount of work you can get done over the amount of time you spend |
| 15 | + * work per unit time |
| 16 | + * work has a direction, towards something thus not towards everything else |
| 17 | + * work smarter not harder |
| 18 | + * What about computer scientists? |
| 19 | + * expressive power |
| 20 | + 1. automata power |
| 21 | + * finite automata |
| 22 | + * pushdown automata |
| 23 | + * linear bounded automata |
| 24 | + * Turing machine |
| 25 | + * Turing oracle |
| 26 | + 2. moving down this list you become more powerful in terms of things you can express |
| 27 | + 3. functional power |
| 28 | + * pure untyped lambda calculus |
| 29 | + * lambda calculus with constraints |
| 30 | + * ... |
| 31 | + 4. logic power |
| 32 | + * zeroth order logic |
| 33 | + * first order logic |
| 34 | + * higher order logic |
| 35 | + * datalog |
| 36 | + * with negation |
| 37 | + * prolog |
| 38 | + 5. model power |
| 39 | + * declarative languagues |
| 40 | + * + dataflow variables |
| 41 | + * + laziness |
| 42 | + * + cells |
| 43 | + 6. poetry power |
| 44 | + * sonnet |
| 45 | + * haiku |
| 46 | + * rhymed couplets |
| 47 | + * blank verse |
| 48 | + * free verse |
| 49 | + 7. music power |
| 50 | + * the trombone is strictly more powerful than the piano |
| 51 | + * free to play between tones |
| 52 | + * guitar more powerful than trombone |
| 53 | + * piano more powerful than guitar |
| 54 | + * huh? |
| 55 | + * rock/paper/scissors/lizard/spock!? |
| 56 | + * Expressiveness vs. work done per unit time |
| 57 | + |
| 58 | +## How do we categorise power? ## |
| 59 | + 1. Whose time? |
| 60 | + * Powerful means different things to different people |
| 61 | + * A machine manages power to accomplish a task |
| 62 | + 2. ... |
| 63 | + * Things my stakeholders never ask for: |
| 64 | + * Turing completeness |
| 65 | + * Decidable type system |
| 66 | + * Laziness |
| 67 | + * Negation |
| 68 | + * ... |
| 69 | + * "Writing free verse is like playing tennis with the net down" |
| 70 | + * "When publishing on the Web, you should usually choose the least powerful or most easily analysed language variant that's ..." |
| 71 | + 3. Composition |
| 72 | + * x considered harmful |
| 73 | + * goto |
| 74 | + * global variables |
| 75 | + * mutability |
| 76 | + * dynamic scope |
| 77 | + * explicit memory management |
| 78 | + * feeling of power comes from combining and constraining expressive powers |
| 79 | + |
| 80 | +## Osterhout's Dichotomy ## |
| 81 | + * Overloaded distinction |
| 82 | + * static vs. dynamic |
| 83 | + * complex data structures vs. limited data structures |
| 84 | + * compiled vs. interpreted |
| 85 | + * independent programs vs. glue code |
| 86 | + * C, C++, Java vs. Tcl, Ruby, Python |
| 87 | + |
| 88 | +## Revenge of the Nerds ## |
| 89 | + * Most languages: |
| 90 | + * Have: |
| 91 | + * conditionals |
| 92 | + * function type |
| 93 | + * recursion |
| 94 | + * dynamic typing |
| 95 | + * garbage collection |
| 96 | + * expressions |
| 97 | + * symbol type |
| 98 | + * Don't have: |
| 99 | + * homoiconicity |
| 100 | + * whole language all the time |
| 101 | + * values |
| 102 | + * identity |
| 103 | + * polymorphism |
| 104 | + * etc. |
| 105 | + * Lisp / Clojure does have those things. |
| 106 | + |
| 107 | +## Measuring Abstraction Powers ## |
| 108 | + * Concision |
| 109 | + * Locality |
| 110 | + * Simplicity |
| 111 | + * "It's not clear that Paul Graham's list of power concepts works for anything other than selling one startup to Yahoo Stores" |
| 112 | + |
| 113 | +## Revenge of the Glue ## |
| 114 | + * static vs. dynamic |
| 115 | + * complex data structures vs. complex data structures |
| 116 | + * compiled vs. interpreted |
| 117 | + * independent programs vs. glue or independent |
| 118 | + * C, C++, Java vs. Tcl, Ruby, Python, Lisp? |
| 119 | + |
| 120 | +## Foreign Function Interface ## |
| 121 | + * ... |
| 122 | + |
| 123 | +## What's not glue? ## |
| 124 | + * static vs. dynamic |
| 125 | + * complex data structures vs. complex data structures |
| 126 | + * compiled vs. interpreted |
| 127 | + * independent programs vs. glue or independent |
| 128 | + * C, C++, Java vs. Tcl, Ruby, Python, Lisp? |
| 129 | + |
| 130 | +## Platform Power ## |
| 131 | + * Need: |
| 132 | + * classes |
| 133 | + * interfaces |
| 134 | + * primitives |
| 135 | + * byte codes |
| 136 | + * core types |
| 137 | + * library types ... |
| 138 | + * Don't need: |
| 139 | + * static typing |
| 140 | + * compilation model |
| 141 | + * Clojure aims to provide full platform power |
| 142 | + * "I Didn't right clojure to replace Ruby in my day job, I wrote it to replace Java in my day job" - Rich |
| 143 | + |
| 144 | +## Platform Power Explains ## |
| 145 | + * `reify/proxy`, et al |
| 146 | + * 1.2 -> `protocols`, `deftype` |
| 147 | + * 1.3 -> numeric changes |
| 148 | + * absence of wrappers |
| 149 | + * Clojure / ClojureScript differences |
| 150 | + * compromises with simplicity |
| 151 | + |
| 152 | +## Numeric Options ## |
| 153 | + |
| 154 | +<table> |
| 155 | + <tr> |
| 156 | + <td></td> |
| 157 | + <td>safety</td> |
| 158 | + <td>speed</td> |
| 159 | + <td>type</td> |
| 160 | + <td>precision</td> |
| 161 | + </tr> |
| 162 | + <tr> |
| 163 | + <td>checked</td> |
| 164 | + <td style="color: green">safe</td> |
| 165 | + <td style="color: green">fast</td> |
| 166 | + <td style="color: green">any</td> |
| 167 | + <td style="color: red">limited</td> |
| 168 | + </tr> |
| 169 | + <tr> |
| 170 | + <td>promoting</td> |
| 171 | + <td style="color: green">safe</td> |
| 172 | + <td style="color: red">slow</td> |
| 173 | + <td style="color: red">boxed</td> |
| 174 | + <td style="color: green">arbitrary</td> |
| 175 | + </tr> |
| 176 | + <tr> |
| 177 | + <td>unchecked</td> |
| 178 | + <td style="color: red">unsafe</td> |
| 179 | + <td style="color: green">fastest</td> |
| 180 | + <td style="color: green">any</td> |
| 181 | + <td style="color: red">limited</td> |
| 182 | + </tr> |
| 183 | +</table> |
| 184 | + |
| 185 | +## Instructive Exceptions ## |
| 186 | + |
| 187 | + * integer byte code operations |
| 188 | + * creating interfaces |
| 189 | + * implementation inheritance |
| 190 | + |
| 191 | +## Library Power ## |
| 192 | + * does library exist? |
| 193 | + * can I find the library? |
| 194 | + * ... |
| 195 | + |
| 196 | +## Can we have a small shot of easy? ## |
| 197 | + * Error messages Rich? :) |
| 198 | + * Life would be easy if: |
| 199 | + * ... |
| 200 | + * Feeling powerful |
| 201 | + * expressive power |
| 202 | + * core (red) |
| 203 | + * library (green) |
| 204 | + * platform power (red) |
| 205 | + * library power (green) |
| 206 | + * ease (green) |
| 207 | + * Changes to all things in red have to go through Rich |
| 208 | + * Changes to all things in green are community driven |
| 209 | + * Adding comforts should be paralleliseable |
| 210 | + * shouldn't have to go through Rich |
| 211 | + * modular contrib now community owned |
| 212 | + * Comfortable needs to be there in development, slim and speedy for production |
| 213 | + |
0 commit comments