4 ms·
Go has a similar problem: function calls and type conversions share the same syntax (or sufficiently the same syntax). If you see `x(t)` in a Go file, there's
by gnuvince 12y ago
Go has a similar problem: function calls and type conversions share the same syntax (or sufficiently the same syntax). If you see `x(t)` in a Go file, there's no way to know if that's a function call or a type conversion without some semantic information. Also built-ins, which also look like functions, come in to add an extra layer of difficulty.
- tomp 12y agoYou can interpret that as calling a coercion function that converts a value from one type to another type. Python actually works like that.