Search code examples
programming-languages

What hash/map based programming language exist?


Much like lisp is often considered a list based programming language what languages are considered map based?

I remember reading about one a few years back, but can not longer find a reference to it. It looked something like:

[if:test then:<code> else:<more code>]

edit: and more where quoted code blocks which would be conditional evaluated. In this fashion if/cond and others would not be special form as they are in lisp/scheme.

The syntax above is supposed to be map/dictionary like just like lisp's syntax is list like.

if would be a key with the value of test.

then would be a key with the value of .

...


Solution

  • That looks very much like MISC, a lazy Lisp with maps instead of lists as the fundamental datatype. (It's also lazy, has deep integration of metadata (similar to Clojure) and a couple of other things, but it is still very much a Lisp: functional, homoiconic, macros, implemented as a metacircular interpreter, all the good stuff.)

    Here's some code samples from the blog:

    [if [> 5 10] then:[+ 5 10] else:[- 5 10]]
    
    [let '[square:[lambda '[x:1] '[* x x]]]
        '[square 12]
    ]
    
    [take 20 [numbers from:0]]
    

    Unfortunately, it seems that besides two blog articles from long ago, there's not much going on anymore.