you are viewing a single comment's thread
view the rest of the comments
[–] 16 points 11 months ago (3 children)

I find it much easier to find the function definitions when the word function is a different color than most of the surrounding text.

if the author meant "find a specific function def according to it's name or role" then I could at least appreciate the perspective. As it stands, I can't help but notice that their supposed "better highlighting for finding defs" example is not using the same source code: the preceding anonymous immediately-invoked function that englobes the entire first code block/sample is now off-screen and the code blurb itself is different...

  • source
  • hideshow 3 child comments
  • [–] 10 points 11 months ago (2 children)

    the preceding anonymous immediately-invoked function that englobes the entire first code block/sample is now off-screen and the code blurb itself is different...

    That bothered me a lot. Then I noticed in his second snippet, only function names were highlighted. What if I'm reviewing someone else's code and I'm looking for magic strings/numbers that should be factored out as constants or parameters? The first block already has literal values a distinct color; does he expect me to change the syntax highlighting settings on my IDE for every task?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 11 months ago (1 child)

    For what it's worth, the second snippet is just to demonstrate their point about looking for function defs names. Reading the article until the end, they propose a bit more than just coloring function names where they are defined.

    I still don't think the example proves their point, but let's not misconstrue it either.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 11 months ago

    I honestly couldn't get very far because his points were not as clear-cut as he was trying to imply and the tone was confrontational. I have a hard time being told I'm wrong on a matter of personal preference that is individually configurable , and where my choices have no impact on others' experience.

    If he's venting about his own experience, because the most common choices, which are defaults, don't match his preferences, go right ahead. But don't phrase it like anyone who disagrees with you can be demonstrated as objectively wrong with a few simple examples.

  • source
  • parent