Hacker News new | ask | show | jobs
by mikewarot 806 days ago
The closest thing I've seen to truly multi-paradigm was a programming language now lost to time called Metamine, which I kept a clone of[1]. Here's some previous discussion[2]

In Metamine

   a := b   is a normal assignment
   c = d+1   means that c will ALWAYS be equal to d+1 
   z = 10-time    results in a countdown timer, z
That magical equals is declarative programming... something that I've only seen mixed with imperative functioning that one time.

[1] https://github.com/mikewarot/metamine

[2] https://news.ycombinator.com/item?id=27555940

3 comments

IIRC, this was called "permanent assignment" in CPL, a name I very much like.

It's also pretty much the same as a dataflow constraint (see: Amulet, Garnet, Spreadsheets, ...)

In Objective-S, I use the syntax |= for the unidirectional variant of a dataflow constraint, =|= for bidirectional (ObjS uses := or ← for assignment, = for equality). So the above would be:

    a := b.
    a ← b.
    c |= d+1.
    z |= 10-time.  (if 'time' were the current time in ObjS)
https://objective.st
Easy to achieve the same in any language that supports the uniform access principle, and it does not even look magical
Looks like reactive programming to me. Very similar to spreadsheet formulas.