on beeb398 help sign in
41 lines 1.9 kB history raw
1---
2sort: 2
3---
5# Mission statement
7Hoon is a strict, typed functional language which compiles itself
8to the Nock VM (whose spec fits on a T-shirt).
10Hoon's design goal is to support higher-order typed functional
11programming without category theory, formal logic, or other
12interesting math. The reasoning: (a) a programming language is a
13user interface for programmers; (b) most programmers are not very
14good at math. Hoon is not quite as expressive as Haskell, though
15fairly close.
17Good Hoon style varies from good Haskell style. Hoon encourages
18coders to use higher-order programming as little as possible --
19again, simply for UI reasons. For example, multiple arguments
20are curried by default in Haskell and tupled by default in Hoon.
21The house style has been described as "procedural programming in
22a functional language." The power of Haskell, or close, is there
23when we really need it. But we try not to swat flies with it.
25Hoon is objectively simple: its complexity is bounded by the size
26of the compiler, about 3000 lines of Hoon. This is split about
27halfway half between frontend (parsing and macro expansion) and
28backend (code generation and type inference).
30This parser-heavy ratio reflects the belief that our brains are
31better than everyone thinks at learning languages (symbols and/or
32grammars), and worse at learning abstractions (proofs and/or
33algorithms). At first glance, Hoon may look gnarly (though its
34squiggles are more structured than most ASCII-heavy languages).
35But there's surprisingly little under the hood.
37Keeping the Hoon-to-Nock mapping straightforward is a priority.
38Very roughly, Hoon is to Haskell as C is to Pascal. Pascal tries
39to conceal its implementation beneath a layer of abstract
40concepts; C, an "advanced macro assembler," tries to provide a
41similar user experience with few abstract ideas as possible.