Echo JS 0.11.0

<~>

amitport comments

amitport 2469 days ago. link 1 point
I'm pretty sure he understands the difference... he's just saying that if it doesn't make the object immutable then it is not that useful.

(I disagree with him. I think minimal variables reassigning makes code easier to understand and 'const' helps to encourage that)
amitport 2470 days ago. link 5 points
appreciate the effort, but this is really not that useful IMHO.

1 - setInterval is very well known and there should be a real compelling reason to use a custom wrapper api.

2 - the library usage has side-effects... if two dependencies/files use this without coping the instance- things will get unpredictable


3 - you're making SetInterval instances via object copy (prototype design pattern)- the created cloned instance is a new variable, which is what you set out to avoid.
3* - if you prefer objects over the interval return variable, it would have been simpler to use classes (though I still prefer the base API):

class Interval {
  constructor(fn, interval) {
    this.timer = setInterval(fn, interval);
  }
  clear() {clearInterval(this.timer);}
}
[comment deleted]
amitport 2482 days ago. link 3 points
"When will we be not having people that act like that"

Some people are sometimes rude. Some are sometimes condescending. (+ it's a global community and those concepts are not perceived the same universally)

The exchange you linked to does not seem such a big deal to me. (I'm not familiar with the people involved, so maybe I'm missing something)
amitport 2511 days ago. link 1 point
[spam] looks like it the 5th time for this user.
amitport 2519 days ago. link 1 point
Why do you care? Where does javascript limit you?
[more]