-
Notifications
You must be signed in to change notification settings - Fork 143
geval vs observ #1
Comments
alternatively var Event = require('geval/event');
module.exports = Observable;
function Observable(value) {
var event = new Event();
value = value === undefined ? null : value;
observable.set = function (v) {
value = v;
event.broadcast(v);
};
return observable;
function observable(listener) {
if (!listener) {
return value;
}
return event.listen(listener);
}
} |
This distinction is based on FRP literature. For example note the In the future both |
ok, but what about my alternative implementation that uses |
@neonstalwart We could use geval in observ. However that saves a few lines of code and makes observ harder to read. |
don't geval and observ do roughly the same thing (a very minor difference)? is it redundant to include both? maybe observ is sufficient for everything?
The text was updated successfully, but these errors were encountered: