Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>And you change the code accordingly, IF it does. Typically though, its best to change the structure of the code, not to increase its local complexity. If the context gets complicated, think about what makes sense to be split out. Local complexity should be kept minimal.

My method requires no changing ever. With better "functional phrasing" I make the title of a function independent from context. Similar to a module.

You however are saying that the name and context are tied together thus to handle it you change the name and context and structure all together. This is objectively worse.

>And you change the code accordingly, IF they are. But you name the lambda, not the generic function. There is a huge value in using a standardized vocabulary. Even in English, we get value out of "baby" versus "small human between the age of 0 and 2 years")

And there it is, more changes. Every change and edit to working code is a potential for a new bug. A change to structure of the code should be made independently to naming. Modularity is important.

>More generally, I've seen this kind of thinking before. A programmer discovers some "universal truth" which applied well in some context and they get so obsessed with it that they start applying it everywhere.

First off stop commenting on my character. Second off of course caveats apply. I never said disregard caveats. It's also perfectly fine to take on a bit of technical debt and use a one letter name to save time when needed and according to context. My argument is for knowing what is technical debt and what's not. Don't make random assumptions here, get your head straight and focus on the topic at hand.

We can get rid of the "caveat" distraction by just examining an example without caveats:

      find_xy_coordinate_of_dogs_cats_and_baboons_in_picture
My claim is that the above is an informative and perfectly good "function phrase" Your claim is that this is worse. Caveats do not apply in this example.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: