|
|
|
|
|
by int_19h
454 days ago
|
|
C# supports top-level functions as well, that's not the issue. But, just to give a simple example, in TS you can do things like: var foo: { bar: { baz: string } }
which have no equivalent in C#, because it doesn't have anonymous struct types, and its typing system is almost entirely nominal. Go, on the other hand, can translate this directly pretty much mechanically: var foo struct { bar struct { baz string } }
And keep in mind that they aren't completely ditching the existing implementation, either, so for a while they're going to have to e.g. fix bugs in both side by side. It helps when the code can also be mapped almost 1:1. |
|