Posted by rafaepta 9 hours ago
Do you want to iterate using for loop or using .iter().step(2).map()?
I would rather have consistency than a mixed bag of levels of abstractions.
This isn't really a good example, assuming both can be used to represent the same thing.
The problem with the wrong abstraction is when your abstraction doesn't let you represent something. Then, because of you've already invested so heavily into it, you start contorting the problem to fit your abstraction and it becomes a shit show.
I don’t think it matters, specially for sort sized loop scopes
Otherwise what is better is better and we don't know what we don't know
You cannot find the edges of the system with structure you don't understand because once the abstraction are set in place solutions often have the same shape as the frameworks which leads to ultimately really bad systems.
The best way is often not the obvious way. Once you reach the edges then you can think how to program the abstraction but that is many versions down the line from the original.
But beyond that, any stable abstraction is better than duplicated code.
With AI, we really need to rethink the clean code principles.
https://caseymuratori.com/blog_0015
Previously discussed:
https://news.ycombinator.com/item?id=17090319