Hacker News new | ask | show | jobs
by tigershark 3521 days ago
This is just a dsl, you can write easily something equivalent or even better in other languages, but doesn't really tell you anything about the underlying language. What is the difference with:

    let messages = search slack_message body
to me this version seems more readable without the square brackets, hash and @ distractions. Why as a non programmer I would ever want to know when to use @ instead of # and when to put square brackets? I think that the F# version that I posted it's easier to read and to write for a non programmer.
1 comments

No, it's more than just saying let messages = search, as in eve this is being run whenever search changes, whereas in other languages it is run when you explicitly call it
Now this sounds very dangerous - one of big problems of declarative style is that it's too easy to accidentally build a system that does much more than you intended, totally killing performance.

There is a very, very big difference between running a search once and re-running it whenever search changes; if you want it one way then you definitely don't want it the other way and that would be a serious problem.

That's not a "in this language" issue, you can do both ways in any language, but this choice you made should be (a) explicit and (b) obvious, which it doesn't seem to be in this case; where a reader can reasonably expect the search to be run once.

Actually in Eve it is explicit, there is bind and then there is commit:

http://docs.witheve.com/handbook/bind/