News for hackers. Stuff that matters.
Re:A fun optimization trick from rsync by OskarS on Monday October 29, 2018 @05:25AM (#18326040)
So, slightly off topic, but one thing from C that I really miss in other languages is subroutine-local static variables. It always annoys me in Java or C# that you can't really make a static variable that's scoped to a single method or function, you have to scope them to the entire class. It's common enough that a private static variable is only needed in a single method or function, so why not do it the way C does it?
Re:A fun optimization trick from rsync by VMG on Monday October 29, 2018 @05:29AM (#18326065)
In js you can use `this.x` or `this.methodname.x`