4 ms·
I had the same question. More generally, it's a "design smell" for me to see something like this: // define a new timely dataflow computation.
by spinningslate 6y ago
I had the same question. More generally, it's a "design smell" for me to see something like this:
// define a new timely dataflow computation.
timely::execute_from_args(std::env::args(), move |worker| {
Why would something as fundamental as creating a new dataflow need a comment? In other words: why is that not self-evident from the syntax?
Not to denigrate the technical accomplishments. And elegance/readability is a very personal thing. But it does seem jarring when the language constructs don't obviously map cleanly to the design intent.
- frankmcsherry 6y agoNaming things is hard. In this case, the command does not create a new dataflow, it creates a new timely dataflow computation by executing the closure on multiple workers. The computation can then spin zero, one, or many dataflows interactively. Dataflows come and go as the computation runs.
- Enginerrrd 6y agoFor what it's worth... someone like me could benefit a lot from this comment. It would allow me to understand some of the intended design from an abstracted point of view, and gives me a bunch of hooks to start googling to understand what's going on. The syntax here doesn't otherwise communicate that to me at all.
- spinningslate 6y agoresponding to both children as they're related: Enginerrrd said: > The syntax here doesn't otherwise communicate that to me at all. Assuming I'm understanding you correctly, that's my point. If the syntax doesn't communicate intent, it suggests a usability limitation. frankmcsherry said: > Naming things is hard. Agreed. Hence point about readability being a personal thing. In this case though, look again at the comment and the line of code. I'd suggest that very few people, on reading the code without the comment, would guess that it was creating a new dataflow computation. > In this case, the command does not create a new dataflow, it creates a new timely dataflow computation Good point, thanks for the correction.