4 ms·
What part of list.delete(x) Is hard to understand if you didn’t write it?
by d3nj4l 6y ago
What part of
list.delete(x)
Is hard to understand if you didn’t write it?
- philosopher1234 6y agoI don’t think that example tells the whole story. You have to zoom out and consider what code based look like when this trade off is made repeatedly by devs. When “easyness” or DRYness becomes king you get ravioli code, and it becomes unintelligible. Keep it simple
- majewsky 6y agoMy persistent impression of the Ruby ecosystem is that everyone optimizes for clever one-liners so hard that all other priorities go out the window.
- theshrike79 6y agoIf we're still talking about Ruby here: List could be _anything_. It might be a list of numbers, it can be a dataset in a remote server, it can be a web page parsed into a list of sentences, it might be list of people in Active Directory. You literally can't know what's going on under the hood without popping it and looking for yourself. Ruby's infatuation with clever magic code is what turned me off it years ago. You can get up to 80% in 20% of the time compared to other languages, but then you spend the 80% of time you have left fighting against the magic to get the last 20% done properly. There's way too much stuff You Just Need To Know.