Have fun, don't waste these years worrying about the future, you'll get plenty of time in the next 50/60 years to do that but you'll never get your youth back.
Deleted Comment
function getGetNext() {
let i = 2;
return function getNext() {
const next = i;
i = i * 2;
return next;
}
}
As a lisp coder [and not a JS coder], I'm wondering: why does the function getNext() have to be named? Why not just say something like: function getGetNext() {
let i = 2;
return function() {
const next = i;
i = i * 2;
return next;
}
} function * getNext(){
let i = 2;
while(true){
i = i * 2;
yield i;
}
}
Here, no closure needed.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid...
Deleted Comment
Deleted Comment
Don't assume anything, I never talked about OO, or functional programming, or event sourcing or any number of programming concepts without a "standard". Don't make up things in an attempt to further whatever point you are trying to make here. I never talked about those things and don't care about them.
Deleted Comment
Deleted Comment