3 ms·
> Write Code. Mostly functions. Not too much. Think about data structures (types) first. Mostly immutable structures. Then add your functions working on those
by haspok 5y ago
> Write Code. Mostly functions. Not too much.
Think about data structures (types) first. Mostly immutable structures. Then add your functions working on those structures. Not too many.
- throwaway2037 5y agoOMG. This is exactly my experience after trying to write code first for 10+ years. (Yes, I am a terrible [car] driver, and a totally average programmer!) "Bad programmers worry about the code. Good programmers worry about data structures and their relationships." - Linus Torvalds He wasn't kidding! And the bit about "immutable structures". I doubted for infinity-number-of-years ("oh, waste of memory/malloc!"). Then suddenly your code needs to be multi-threaded. Now, immutable structures looks genius!