Unofficial Hacker News companion — get notified on comment replies, and more.

I checked Clojure's core with Lean and found unreported bugs (opens external site)

238 points by encyclopedism 6 days ago | s.conao3.com | 86 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (3)

  1. Or as Bob Harper would say, unityped.
    Replies (1)
    1. That is an ignorant concept which conflates the implementation level with the program's abstraction.

      At the implementation level, there exist storage locations (which we might call "value cells"). These can hold any value and so in a sense they have one type.

      The abstract nodes of the program, its expressions, have a type we can reason about. Often a single type that can be known without executing the program..

      Static functional languages, too, have typeless value cells in their implementations: word-sized units of storage that can point to anything and may have type tags, gc bits and whatnot. The difference is that nodes of the abstract program are checked.

      Dynamic languages have type inference implementations also. The situation is not so strict that an uncheckable program may not be executed, though.

      Replies (1)
      1. Harper isn't talking about memory layout. He's talking about static typing rules, where "types" in dynamic languages are just runtime tags. If a language's typing rules accept every well-scoped expression regardless of what operations you apply to it, then it has one static type.