declo
aims to improve the ergonomics of functional programming syntax in python. It extends the JS syntax into python.
- Create lambdas with arrow notation
import declo
add_one = declo.func("x => x + 1")
assert add_one(1) == 2 # True
- Create named functions globally
import declo
# this creates a function foo in the global name space.
declo.run("let foo = x => x + 1")
assert foo(5) == 6
- Can we introduce synctatic sugar with pre-processing?
- Can we dynamically create native objects using
ast
,compile()
ortypes.FunctionDef
? - What are the hard things - like closures?
- How do we handle linting?