4 ms·
Using asyc/await vs promises makes very different design decisions in js and if you know only one you may not design something optimally Optimally? How would y
by solipsism 8y ago
Using asyc/await vs promises makes very different design decisions in js and if you know only one you may not design something optimally
Optimally? How would you even define that? Good developers make good use of the tools that are laid out before them, and sure the available tools differ in each language. But:
1. These languages tend to have more in common than they do different.
2. These concepts aren't magic. They're relatively easily understood, and you can make good use of them long before you can call yourself an expert in the language.
3. A good design doesn't necessarily make use of any specific language feature. e.g. a Go library might be well designed and make use of mutex (a very generic and ubiquitous concept). It's not a "quick hack" just because the author didn't choose to use channels.
- nickthemagicman 8y agoI agree you can "get things done" in any language if you know the concepts. But an expert at a language gets things done in the most optimal way, most rapidly, with minimal tech debt. That's all I'm saying and it may be anecdotal but it's been my experience in the industry.
- squirrelicus 8y agoAn optimal design is one that addresses the most problem complexity while introducing the least incidental complexity. It's objective, but difficult to measure. If you use cron to implement a hello world program, the design is not an optimal one, for example.