Hacker News new | past | comments | ask | show | jobs | submit login

This makes me think about some sort of exec-with-dynamic-scope approach to functions, like:

    func = {
        b = 1 + a
    }
    result = func {
        a = 1
        c = a + b
        d = 3
    }
Where func {...} (two adjacent blocks) is like a composition and merges the two blocks. "=" has the mathematical meaning, not assignment but a statement of equality. The parameters are just the free variables, e.g. func has a parameter of a. Are external routines or functions also parameters? I'm inclined to say yes, and that it's interesting to treat them as such.

This is all very Mathematica/Wolfram-like, with concrete expressions with undefined terms, different than functions that are executed.

The result has no real sense of order, and so it implicitly has to be purely functional. I can imagine using this to build things-that-execute, where this code doesn't execute but defines an execution (like tensorflow). Or there's some outside layer that creates streams of input, and the "execution" is how it responds to those streams. That outside layer is where all the system integration happens. It would work well with React-style unidirectional data flow. But I think for any practical program you'd have to live in both worlds.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: