Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataflow.cell: closure vs class? #28

Open
joshuahhh opened this issue Nov 21, 2015 · 1 comment
Open

Dataflow.cell: closure vs class? #28

joshuahhh opened this issue Nov 21, 2015 · 1 comment

Comments

@joshuahhh
Copy link
Collaborator

Was there a particular motivation for making Dataflow.cell a big ol' closure rather than a class with an evaluate method? Without knowing such a motivation, I feel like it would be easier to understand as a class.

(I'm interested in working on this.)

@electronicwhisper
Copy link
Collaborator

I had made it a closure instead of a class because I thought this mechanism would be used more throughout the code, so I wanted a "DSL" way of dealing with it. But cells ended up only being used in a few places (Attribute and Element).

So the short answer is I'm fine with making it a class since that will be more understandable.

The long answer is I'm not sure if even this mechanism is the right thing. I am, for example, worried about the efficiency of depending on try-catch to find spreads. The nice thing about cells is that they decouple the spread logic from everywhere else. The idea of cells was to support this logic closer to the language level. I would love hearing other ways of doing it though if you think of anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants