Tractatus Pico-Blaesicus

The title of this article is inspired by the famous (Tractatus Logico-Philosophicus). The Latin word "blaesus" means "lisping" :)

Here we will try to give a thorough description of all pros and cons of the programming language PicoLisp.

The pros of PicoLisp

1. Picolisp is Simple

2. PicoLisp is Transparent

There is a 1:1 mapping between external and internal representation

a. No compiler messing with the code

b. Symbols have a clear identity
  1. A symbol has a unique address
  2. Values are bound to symbols (stored in VAL)
  3. Unlike lexical binding, where variables are detached from symbols
c. Interactive access to runtime structures
  1. Each symbol has its value in a dedicated value field
  2. A Lisp-level function is just a list
  3. OOP/Inheritance: List of functions (methods) and symbols (classes)
  4. Closure-environments are explicit list structures
  5. Destructive and non-destructive list manipulations. No hype about "immutable data structures"

3. PicoLisp is Powerful

a. Powerful NOT in terms of processor performance

b. But powerful in terms of expressivity. Complicated things can be expressed easily

c. The use of FEXPRs
  1. A FEXPR is a function which does not evaluate its arguments. Decisions about evaluation are delegated to the function body
  2. Other languages must use macros for that
  3. On the lowest level, +all+ functions are FEXPRs in PicoLisp, or - to be correct - FSUBRs, the machine-code counterparts of FEXPRs)
  4. Compiler-based languages frown at FEXPRs
d. Orthogonality
  1. NIL is universal
  2. Single symbolic data type
  3. Single functional type
e. Connectivity
  1. Calling native libraries with the native function
  2. Interfacing to Java objects -> Java Interoperability
f. Equivalence of code and data. True equivalence, not just at the source level

g. Built-in database

h. Succinctness. Read Paul Graham: Succinctness is Power

4. PicoLisp is Efficient

a. Not especially efficient in execution speed, but still quite fast for an interpreter, but in terms of programmer's effort b. Efficient in terms of machine resources

The cons of PicoLisp

1. Lisp syntax

People dislike "many parentheses"

2. Interpreter-only

a. Slower in execution speed as compared to a native compiler ( but faster than some Lisps which compile to byte code)

b. An interpreter has advantages over a compiled language
  1. True equivalence of code and data
  2. Faster startup and file loading
  3. Smaller memory footprint

3. Omitted features

Floating-point numbers, but infinite-precision fixpoint numbers can be used instead

4. Arrays

Array Abstinence

5. Threads

a. Threads which share runtime heap are not possible in PicoLisp
  1. They would overwrite each other's symbol bindings
  2. This is due to dynamic binding
b. Instead, communicating processes are used
  1. Forking processes in PicoLisp is efficient
  2. Built-in interprocess-communication (Family IPC)
  3. Processes can be distributed across multiple machines
c. Coroutines as cooperative, controlled threads

5. Flaws

PicoLisp may segfault

https://picolisp.com/wiki/?prosandcons

24jun18   ArievW