Hacker News new | ask | show | jobs
by Aardappel 2639 days ago
It is not intended to be Python compatible, it merely has indentation based syntax that is similar.

The cases where it differs from Python are actually for good reason: unlike Python that only has built-in control structures, here any function can look like if/for/while if it takes a lambda body.

3 comments

This seems like a cool way to make an ad hoc dsl. I'm not a game programmer but I imagine it could be useful.
This seems like a cool way to make an ad hoc dsl. I'm not a game programmer but I imagine it could be useful

Smalltalker here. Being able to pass in lambdas very casually is a great way of producing an ad hoc DSL. Imagine a custom control structure which does a database transaction. Just implement a function!

Yup, this style of programming I use all the time in Lobster.
> unlike Python that only has built-in control structures, here any function can look like if/for/while if it takes a lambda body

That's absolutely fantastic. I've had to do a lot more Python programming for work, and I've been thoroughly disappointed by Python's lack of support for custom blocks/structures like that (contrast with Ruby or Elixir, where any function can take a do ... end, or with Tcl where "blocks" are just strings).

So is it a bit like Rebol (or Red, or even Joy if we pretend RPL is not a significant difference), or is it a very different style of implementation?