3 ms·
That's pretty fancy, and (as another poster said) a great way to pitch the language. Nice work! While I feel that expressiveness is good to an extent, I can't
by taneq 10y ago
That's pretty fancy, and (as another poster said) a great way to pitch the language. Nice work!
While I feel that expressiveness is good to an extent, I can't help feeling that there's a certain point beyond which increasing expressiveness is detrimental to productivity and overall code quality. While it's certainly elegant and satisfying, in order to read or understand the code you have to 'unpack' it mentally, requiring much more work than if it had been written at a lower level of abstraction. This seems to me to be related to something I read recently (I wish I could find the link), saying that all human languages tend towards a fairly predictable word entropy which allows a good balance between efficiency and error correction capability.
(Obviously this was a demo to highlight the language's power, and not how you'd write real-world code, but still.)
- ffggvv 10y agoMaybe this is why so many people love Golang (including me). It's a corporate language after all.
- taneq 10y agoI still default to C++ (or at least, the subset thereof which works for me). Occasionally I've eyed newcomers like Rust and Go from across the room but haven't yet found a compelling enough reason to burn a bunch of my free time learning another language. Golang looks at very cursory glance to be yet another entry in the "modern C-like" column. If you could recommend one link to read to convince me that it's worth learning, what would it be? My main dev work is native Windows/Linux GUI, Linux command line utils/servers, and embedded development.
- etatoby 10y agoI don't have a good link at my fingertips, but IMHO the killer features of Go are: - super-fast compilation, so much so that you can write Go "scripts" that are compiled and run from the #! line every time you call them, faster than it takes the Python interpreter to start; - static binaries: this eliminates an entire class of problems, such as DLL hell and OS version dependencies; - great concurrency model, easy, powerful, and safe, based on CSP; - implicit interface implementation, which makes it easy to integrate different libraries (I'm not sure what the academic name is for this feature, but it's taken straight from Common LISP, Haskell, etc.) Highly recommended. Easy to learn and very comprehensive standard library.
- jerf 10y agoGo has had some surprising success in command line tools, probably because it's one of the easier languages to deploy static binaries in. Windows/Linux GUI is more-or-less a no-go, and "embedded", well, it depends on how you feel about 3MB+ executables as the minimum size. If "embedded" here means "cell phone" level of capabilities, that may not bother you. If embedded means "I'm counting the kilobytes" then it's also a no-go.
- srean 10y agoA general comment, noting related to any specific language. The mental unpacking to read does improves over time, as you get familiar with frequently occurring patterns. But what I find more interesting is the "write" side of the story, not the "read" side. I have encountered many who think just because the code is short and succinct it must have taken no more than a jiffy to write. It takes mental effort to distill a complex idea to a short idiomatic string. What you get rewarded with after that exercise is less space for subtle bugs to hide. It is quite difficult to write very short pieces of code with non-obvious or subtle bugs.
- kwhitefoot 10y agoJe n'ai fait celle-ci plus longue que parce que je n'ai pas eu le loisir de la faire plus courte. I would have written a shorter letter, but I did not have the time. Provincial Letters : Letter XVI (4 December 1656) via https://en.wikiquote.org/wiki/Blaise_Pascal https://en.wikiquote.org/wiki/Blaise_Pascal
- taneq 10y agoTrue, it's applicable to any language which aims to be dense in this way - just something that's been bugging me. Unpacking ability certainly improves over time. The problem is, so does packing, such that they tend (at least in my experience) to balance out. The time taken to write, and read, code is dominated by the per-concept costs. So you end up with the writer and the reader of the code still taking the same amount of time per concept, but they're also doing a bunch of translation steps alongside. Since these steps are fallible, you've reduced the overall efficiency. There's not less space for subtle bugs to hide. The space is just folded up, and bugs can also hide in between the folds.
- greggirwin 10y agoAgreed. We can't say that packing is universally good or bad. You can have a dense tangle or distilled elegance.