Hirdetés

Új hozzászólás Aktív témák

  • VikMorroHun

    őstag

    válasz proci985 #20701 üzenetére

    "se hungarian notationt"

    Kíváncsi voltam, mi a baj ezzel. Wikipédián találtam is egy vicces felsorolást.

    Főleg ezek a pontok tetszenek:
    - Most of the time, knowing the use of a variable implies knowing its type.
    Talán igen, talán nem.
    - Furthermore, if the usage of a variable is not known, it cannot be deduced from its type.
    Igaz, de nem is ezért találták ki.
    - It makes code less readable, by obfuscating the purpose of the variable with type and scoping prefixes.
    Tehát egy változó elnevezési gyakorlat, ami segíti a kód olvashatóságát, megnehezíti a kód olvashatóságát. Aha.
    - The additional type information can insufficiently replace more descriptive names. E.g. sDatabase does not tell the reader what it is. databaseName might be a more descriptive name.
    Az sDatabaseName az meg nem lehetséges, ugye.
    - It's harder to remember the names.
    Miért is?

    További érdekesség: a hivatkozott irodalomban szerepel a Clean Code egy bizonyos Robert Cecil Martintól. :)

Új hozzászólás Aktív témák