Comment

Comment by snidane

Controversial opinion but I believe that eventually these grammars and complex parsers will be found to have been a huge mistake for computer science. A mistake made for the sole reason of making programming languages resemble natural languages, even though they are not meant to be read fluently.

Everyone who experienced the magic of lisp understands how beneficial it is to have the textual representation as close to the parsed abstract syntax tree. One can create new languages fit for the purpose of a given class of problems and thus reducing size of codebase 10 to 100 fold (or even million times in case of modern multi million LOC software projects).

The biggest mistake lisp ever made was the unintuitive parenthesized prefix notation. Which can be thrown away by having all operations strictly infix.

Ie. instead of doing combinations of the following:

  lisp: (plus 1 2)
  methods: 1.plus(2)
  algol,C: plus(1, 2)
  haskell: plus 1 2
One can use the simplest form ever and achieve even simpler lisp:

  1 + 2
but use it consistently for every function call or operator within the language. (even for functions of multiple arguments).

APL came close, but for some reason decided to ignore the important Phoenician discoveries of 1. reading from left to right 2. use of phonetic alphabet instead of hyeroglyphs.

parent snidane 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton