• mox@lemmy.sdf.org
    link
    fedilink
    arrow-up
    35
    arrow-down
    2
    ·
    edit-2
    10 months ago

    One advantage of snake case is never having to remember which letters of every acronym or compound word each author decided to capitalize.

      • mox@lemmy.sdf.org
        link
        fedilink
        arrow-up
        9
        arrow-down
        1
        ·
        10 months ago

        That viewpoint makes bold assumptions about language, toolset, and preference.

        It also suggests sweeping the dirt under the rug instead of not having it on the floor in the first place.

  • YIj54yALOJxEsY20eU@lemm.ee
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    10 months ago

    I hate that the convention for naming React.useState variables is [color, setColor], rather than [color, colorSet]. After I declare ‘color’, I want to copy/paste that variable and append ‘Set’, rather than copy the variable then writing ‘set’ then pasting then navigating to the 4th character then flipping the case.

    Granted there could be some ambiguity if there was a variable containing a unique collection (aka set) but that is far less common than declaring a useState variable. I’d even settle for appending ‘SET’ to quell the confusion.

  • force@lemmy.world
    link
    fedilink
    arrow-up
    19
    arrow-down
    15
    ·
    edit-2
    10 months ago

    snake case for everything, pascal case for struct/enum/class/trait names, and screaming snake case for constexpr identifiers is the superior method of naming. FUCK camel case, java/c# naming conventions are dumb and stupid and cringe, rust did it right

    i’m in pain every time i use scala/f# or something and i have to actually interact with those HEATHEN java/c#-conformist identifiers