Earlier quoted context omitted.
Writing simple programs that meets requirements should be your goal. Premature optimization is the root of all evil.
Selecting appropriate data structures and algorithms for a problem is not optimization. It's one of the basic skills and responsibilities of a programmer. That's why the bulk of the first volume of Knuth's _The Art of Computer Programming_ is about data structures.
Rob Pike’s Rules of Programming (1989)
121–122 of 122 posts
Using the Set interface is probably the right thing. Then you profile, and if the set implementation you chose is too slow, you just swap it out for another implementation that implements the Set interface.
Re: Rob Pike’s Rules of Programming (1989)
#122Earlier quoted context omitted.
In twenty-five years as a working programmer, I have fallen in love with a piece of technology four times: Emacs (on my third attempt), Tup (the build system by Mike Shal), React... and now TypeScript. I've been using it full-time for a few weeks now, and I can't imagine going back. If you like rule 5... you'll heart TypeScript. Edit : I also spent ~12 years writing C# which is good. But TypeScript is actually more p…
When you say "going back" - going back to what? I mean, is a language where all array keys are strings really the best platform for higher-kinded types?
Presumably going back to pure JavaScript.
Do you have any alternatives to TypeScript, which compile to JS, which fix the array key issue you mention?