3 ms·
That's a terribly biased comparison. The go example defined stdin/stdout/stderr from scratch and much else besides, while the coffeescript version basically cal
by akkartik 15y ago
That's a terribly biased comparison. The go example defined stdin/stdout/stderr from scratch and much else besides, while the coffeescript version basically called a library function.
It's very hard to compare statically-typed system languages with dynamically-typed HLLs. And it's utterly misleading to judge one by the standards of the other.
- deleted 15y ago[deleted]
- mythz 15y agoThat was Go's cat example not mine (I just copied and pasted what was needed for the e.g. to work) - and they both delegated to underlying system/lib calls to do the actual work. The examples do show how to create a higher-level 'File' api to encapsulate lower level os functions, which was the primary motive for their example. The readability of on the different approaches on how to do this is clear in both source files. As for the dynamic vs static argument, well I've added the C# version (sync and streaming) both of which are still less code and more intuitive than go's. https://gist.github.com/1208021 https://gist.github.com/1208021