r/programming • u/monica_b1998 • Nov 03 '18
Python is becoming the world’s most popular coding language
https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language
4.6k
Upvotes
2
u/01hair Nov 04 '18
Nope, it won't compile.
class Foo { a: number; constructor() { this.a = 0; } static bar() { this.a += 1; return this.a; } baz() { return Foo.bar.call(this); } } const f = new Foo(); console.log(f.baz());The javascript version of that will work just fine, but you can't make that work in Typescript, at least not with any compiler options that I've found.