home.social

#programmingterms — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #programmingterms, aggregated by home.social.

  1. @flipsideza same name - that's not a Rust-ism.

    I first came across it in C; it's probably older than that.

    Python has the `global` keyword to use a global scope var in a local function vs "shadowing" it with a local of the same name (check details in pydoc)

    Using type hinting in Python can help avoid problems where a variable is reused for a different purpose and type, but it doesn't have fully immutable variables, unlike other langs

    #shadowing #variables #Python #TypeHints #ProgrammingTerms

  2. @flipsideza same name - that's not a Rust-ism.

    I first came across it in C; it's probably older than that.

    Python has the `global` keyword to use a global scope var in a local function vs "shadowing" it with a local of the same name (check details in pydoc)

    Using type hinting in Python can help avoid problems where a variable is reused for a different purpose and type, but it doesn't have fully immutable variables, unlike other langs

  3. @flipsideza same name - that's not a Rust-ism.

    I first came across it in C; it's probably older than that.

    Python has the `global` keyword to use a global scope var in a local function vs "shadowing" it with a local of the same name (check details in pydoc)

    Using type hinting in Python can help avoid problems where a variable is reused for a different purpose and type, but it doesn't have fully immutable variables, unlike other langs

    #shadowing #variables #Python #TypeHints #ProgrammingTerms

  4. @flipsideza same name - that's not a Rust-ism.

    I first came across it in C; it's probably older than that.

    Python has the `global` keyword to use a global scope var in a local function vs "shadowing" it with a local of the same name (check details in pydoc)

    Using type hinting in Python can help avoid problems where a variable is reused for a different purpose and type, but it doesn't have fully immutable variables, unlike other langs

    #shadowing #variables #Python #TypeHints #ProgrammingTerms

  5. @flipsideza same name - that's not a Rust-ism.

    I first came across it in C; it's probably older than that.

    Python has the `global` keyword to use a global scope var in a local function vs "shadowing" it with a local of the same name (check details in pydoc)

    Using type hinting in Python can help avoid problems where a variable is reused for a different purpose and type, but it doesn't have fully immutable variables, unlike other langs

    #shadowing #variables #Python #TypeHints #ProgrammingTerms