Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The version problem is solved well in FP by catching the old function and translating it cleanly. This ofc also works with data representation.

Im not sure what the point of the post is. Minimizing side effects in your code (keeping functions pure) is what gives you the flexibility he says FP misses?!





If your gut response is "here's a way to make the code better" then, yeah, you missed the entire point of the post.

I was hoping for discussion and got a zero content kneejerk response

The point of the article is that the system is not representable in code so all the tools FP provides are useless in systems programming.

You my friend need more milewski in your life and let go of the idea that code and data are different things.

In this case, we don't have good data representations for code which produces or consumes structured data, where the structure of that data changes over time. We have some pieces figured out for certain domains, such as database schemas, but we do not have a "theory-of-everything" for enforcing types/structure across all domains of our systems. The domain addressed by GraphQL, HTTP APIs, is another instance of this same problem.

There are experimental systems like Unison that keep old versions of your code alive as data, which are fascinating solutions to the underlying problem.


Did you just state that FP cannot solve the problem because some protocol wont allow you to specify types in the manner?

Did you read the article? The issue isn’t code vs. data, it’s code vs. system state. The system can be in states not model-able by code, e.g. versions 1 and 2 of a piece of software running concurrently. Other examples I can think of are things like nodes going down, database consistency, etc.

Technically, not "not model-able" but "not modeled". As in, the effort was not done, and is easy to omit. And doing it in the general case is a lot of work, hence the expand-contract and only-two-versions designs.



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

Search: