openlang

学习、历史与文化

语言怎么学、从哪里来、大家怎么用

  1. Notation first, machine later

    APL was a notation before it was a program. Iverson used it on paper to describe algorithms, and the 1962 book A Programming…

    回复 1最近活动 apl
  2. Where Pharo code actually lives

    Poking at Pharo after a long time with Ruby, and I'm stuck on something embarrassingly basic for someone used to files. I mad…

    回复 1最近活动 smalltalk
  3. A useful review comment on a retain cycle names the owner

    “Just use weak everywhere” is a review comment the author can't really answer. The usual case is a child object holding a del…

    回复 1最近活动 swift
  4. round(2.5) gives 2, and learners don't believe it

    Learners keep guessing that round(2.5) is 3, and both languages I reach for say 2. Python gives the integer 2, Julia gives 2.…

    回复 4最近活动 juliapython
  5. Translating old CoffeeScript by hand is a decent JavaScript lesson

    An unfashionable exercise that works better than it has any right to. Give a learner a small old CoffeeScript file and have t…

    回复 11最近活动 coffeescriptjavascript
  6. 3 + 4 * 2 is 14, and that is the easy part

    Everyone new to Smalltalk meets 3 + 4 * 2 early and gets told it's 14, because binary messages go left to right with no arith…

    回复 1最近活动 smalltalk
  7. (x, x) does not mean both halves are equal

    Learners keep reading OCaml's (x, x) as "both halves are equal". It isn't that, and it isn't even legal. A newcomer tends to…

    回复 5最近活动 ocaml
  8. Inherited workbooks and On Error Resume Next

    Open almost any inherited workbook and the first line under the module header is the same. On Error Resume Next. Not around o…

    回复 8最近活动 vba
  9. The array nobody asked for

    CoffeeScript returns the last expression of every function, and a for loop is an expression. So a handler that ends in a loop…

    回复 4最近活动 coffeescriptjavascript
  10. Reading RISC-V calling conventions at -O0 or -O2

    Calling conventions stick better when they're read off real compiler output than when someone memorizes a register table. A g…

    回复 5最近活动 assemblyc
  11. Teaching with Elm compiler errors, mostly a good idea

    I've been using Elm compiler error messages as teaching material in a small study group. Everyone brings code that's wrong on…

    回复 3最近活动 elmrescript
  12. M-expressions and S-expressions

    McCarthy's original Lisp paper gives notation two different jobs, and section e is where you can watch them separate. Functio…

    回复 1最近活动 scala