3 ms·
Increasing language surface area will generally increase the complexity of all api surfaces written in the language. This has obvious costs. It’s true genetics
by erikpukinskis 8y ago
Increasing language surface area will generally increase the complexity of all api surfaces written in the language. This has obvious costs.
It’s true genetics will shrink some specific APIs, where they are a good fit.
But they will also be used opportunistically by developers excited to push their boundaries.
Of course you can say “just don’t do that” which works if you have a tightly controlled codebase. But most code is not that, and will be handed off to novices over and over for fixes.
So, it’s a question of whether you cater to the advanced developer who can capably handle a vast toolset, or do you commit as a community to more rudimentary tools, in order to reap the rewards of systemic simplicity.
There is no right answer.
I believe in the future all languages will fork into a simpler novice subset for general use and an expansive language for infrastructure. These will both be valid in the same parser, but the subset will be quarantined at the package management level.
Go, EZ-Go, C, EZ-C, etc
I am writing all of my code in EZ-JS
- closeparen 8y agoIt’s C’s lack of complexity which makes it necessary to do dangerous things for everyday purposes. I’d much rather a novice interact with generics, where the compiler is a safety net, than with void * and interface{}.
- themihai 8y ago>> It’s C’s lack of complexity which makes it necessary to do dangerous things for everyday purposes. That's not the case anymore. We have C++ which has generics and "fixed" C's lack of complexity for sure...Now for some 'weird' reasons some people still use C. Wonder why ?
- wbl 8y agoCompare C++ to Standard ML. Simplicity is compatible with generics.
- pjmlp 8y agoIt is not the case since 1993, when CFront was dropped. In certain domains like UNIX like OSes, I don't see C ever going away, due to the infrastructure, symbiotic relation with the OS that gave it birth, and the culture.
- dullgiulio 8y agovoid * and interface{} are not going away when generics come. Try searching for "Object" or "<?>" in some Java code...
- Filligree 8y agoWhich is why Go 1's type system was a bad decision. interface{} should have never existed in the first place. At least it'll definitely get rarer.
- jpfed 8y ago>I believe in the future all languages will fork into a simpler novice subset for general use and an expansive language for infrastructure. These will both be valid in the same parser, but the subset will be quarantined at the package management level. I don't think we'll see this happen much for existing languages, but it could be a very interesting angle for a newly-designed language (or rather pair of languages).
- Tarq0n 8y agoTo some extent this is already happening in languages popular for machine learning. Libraries are written in C/C++ and the users just glue things together with very accessible API's.
- erikpukinskis 8y agoIt’s already happening. For example many people code in a subset of C++.
- m90 8y ago> Of course you can say “just don’t do that” This exactly. The beauty of Go is that currently you do not need a book called "Go, The Good Parts". Yes, generics would make a lot of things easier, but almost everything more complex and footgunnish.