Hacker News new | ask | show | jobs
by xonix 463 days ago
Long time ago I was obsessed with Prolog. I found that if you bend it enough you could implement imperative code (a-la JavaScript) evaluation, still being valid Prolog:

https://github.com/xonixx/prolog-experiments/blob/main/Prolo...

This was super funny, but obviously absolutely useless

1 comments

Why do you say that? Imagine you wrote a language that looked procedural but was actually relational underneath? We could get rid of so much glue and use unification when it made sense and ignore it otherwise. That’s a great idea
Sounds similar to Haskell "do" notation where it can look procedural, but backed by FP principles and tools.

(Something something monads are sequentialness)