wiki:Principles

Principles

Fundamental principles:

  • Language is the key
    A human language (and based on it reasoning) is exactly what distinguishes humans (and their societies).
  • Abstraction is a universal method
    Abstracting out irrelevant details (by forming closures) is how to cope with complexity.
  • Stable environments
    That apriori which makes learning (everything What Is) possible.
  • Immutability
    Functional processes. Same input - same output. Always. This is what makes Life Itself possible.
  • Contexts and types are required
    To use language based abstractions (and reasoning) contexts and types are necessary and sufficient.
  • Everything What Is has a structure
    Language itself has a structure and patterns. Mathematics is the way to capture these patterns.
  • Structure is the only knowledge
    Abstract bullshit is not a knowledge, it is merely mental constructs.
  • Knowledge is power

Implications

  • No language - no knowledge accumulation
    Sharing of knowledge is what makes a civilization. Writing everything down is enough.
  • First-order logic is the way
    Precise use of language is the only way to avoid misconceptions and resulting bullshit.
  • Lambda calculus extended with types, contexts and logical connectives is a core language.
    Pure higher order logic.
  • Knowledge is understanding (realising) of an underlying structure (of a process).
    No more, no less.

Principles guided processes

Choose the people who take principles seriously and put them first.

  • Scheme by Guy Lewis Steele Jr. and Gerald Jay Sussman
  • Haskell by Paul Hudak and Simon Peyton Jones
  • Scala by Martin Odersky.
  • Go by Rob Pike and others.
  • PLOT3 by David A. Moon.

Taken form David A. Moon's PLOT.

Everything about the language is to be defined in the language itself. The syntax is totally user-definable - no built-in syntax! Everything is a macro, exported by a predefined module. Any language that can't handle macro-defining macros is babyish.

Fully object-oriented (an object has a structure - slots and multi-methods from the ground up). Every value, without exception, is an instance of a class. There are no magic "primitive" data values that work differently from everything else.

Typing is dynamic. That is, objects have types. The type of an object is simply its class. An object is a member of its class and also is a member of each type from which its class inherits.

General principles

Same things must have same names.

Similar things must look similar, different things - different.

Do not create entities without necessity

Think in terms of bindings, not box-like variables.

  • a binding is an association between a symbol and a value. It produces a named reference.

Values has a type, not a variable.

Duck-typing is good-enough.

Mostly-functional.

  • a function neither examines nor alters any external state.
  • a function can affect the outside world only through its return values.
  • Same input - same output. Always.

Use smallest subset of classic idioms

  • use a very small set of primitives and means of combination.

Use classic idioms

  • function composition, folding, mapping, filtering

Generalize for reuse.

  • instead of mixing the general and the specific, define (abstract out) the general and pass the specific as an argument.
    • Sorting algorithms and comparison function

Programs must evolve (be recursively simplified until approximation to perfection is achieved)

  • changes are good, inevitable and welcomed

Use a smallest possible subset of a language.

Design around Protocols and Interfaces.

Bootstrap your own language on Lisp (embedded in Lisp), and write your program in that.

A program must written as a series of layers, each one acting as a sort of programming language for the one above.

Grow layers of DSLs out of high-order procedures and macros, simultaneously writing a program and a programming language.

Last modified 12 months ago Last modified on Dec 6, 2019, 6:22:08 AM
Note: See TracWiki for help on using the wiki.