DEV Community

Discussion on: Use fake static classes to protect your namespace (js/ts)

Collapse
 
qpwo profile image
Luke Harold Miles

Another opinion I have is that property getting and method invocation should not look the same. So if typescript does one day add a receiver-function-like feature (unlikely) it should look like this:

const x = point.x
const mag = point->mag()
Enter fullscreen mode Exit fullscreen mode

But the syntax is huge as-is anyway.