Hypercubed / f-flat_node

F♭ (pronounced F-flat) is a toy language.

Home Page:http://hypercubed.github.io/f-flat_node/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why no static types

bobiblazeski opened this issue · comments

Concatenative Array approach is very interesting, but why keeping the language dynamic since you mention Haskell as influence?

The first influence for f-flat was RPL (reverse polish lisp) implemented in the HP48 calculator. From there I spent time researching concatenative languages like Joy and Factor and more recently languages like PureScript and Haskell.

The real answer is that first and foremost f-flat is meant to be an interactive environment like MatLab or Mathematica. It should be easily typed and easily read. Three things that I decided based on this:

  1. RPN notation (left to right, top to bottom)
  2. Dynamically typed
  3. Type overloading for primitive words.

If each primitive word has meaning for multiple types (see for example + https://github.com/Hypercubed/f-flat_node/wiki/Base#-plus ) then derived words can also work across multiple types. For example map works on both arrays and strings.

An additional goal is to implement the absolute minimum primitive words, sometimes this is at the cost of performance.

Thank you for your interest. All feedback is valuable.