Alien Top
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
JPDev@programming.dev to Programmer Humor@programming.dev · 1 year ago

Whitespace

programming.dev

message-square
58
link
fedilink
293

Whitespace

programming.dev

JPDev@programming.dev to Programmer Humor@programming.dev · 1 year ago
message-square
58
link
fedilink
alert-triangle
You must log in or register to comment.
  • GissaMittJobb@lemmy.ml
    link
    fedilink
    arrow-up
    69
    arrow-down
    2
    ·
    1 year ago

    Having an asterisk both be the type indicator and the dereference operator is one of the great programming language design blunders of our time, along with allowing nulls for any type in so many languages.

    • Blackmist@feddit.uk
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      Having assignments return a value is right up there as well.

      • GissaMittJobb@lemmy.ml
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        Because of the possibility of accidentally performing an assignment in a conditional expression?

        If yes, I agree that it’s not great.

        • Blackmist@feddit.uk
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 year ago

          Yeah, exactly that.

  • fl42v@lemmy.ml
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    std::shared_ptr p;

  • dbilitated@aussie.zone
    link
    fedilink
    arrow-up
    16
    arrow-down
    1
    ·
    1 year ago

    I’m just a c# dev wishing to fuck we had something visual to indicate reference types so my coworkers could stop misusing them

    • vithigar@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      It’s such a short list of value types though. How can they have that much trouble? All of the various ints and floats, bool, char, structs, and enums. Everything else is reference.

  • Victor@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    1 year ago

    Wait until I tell y’all about const.

  • catconnoisseur@lemmy.ml
    link
    fedilink
    arrow-up
    6
    arrow-down
    2
    ·
    1 year ago

    no int * ptr fans here?

  • RandomCookie420@eviltoast.org
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    3
    ·
    edit-2
    1 year ago

    deleted by creator

  • Exocrinous@lemm.ee
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    5
    ·
    1 year ago

    Int *p is unreadable, unreasonable, and bad programming.

    • Ferk@kbin.social
      link
      fedilink
      arrow-up
      12
      arrow-down
      1
      ·
      edit-2
      1 year ago

      But C syntax clearly hints to int *p being the expected format.

      Otherwise you would only need to do int* p, q to declare two pointers… however doing that only declares p as pointer. You are actually required to type * in front of each variable name intended to hold a pointer in the declaration: int *p, *q;

      • Exocrinous@lemm.ee
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        6
        ·
        1 year ago

        That’s because C was designed by a fool.

        • Aatube@kbin.social
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          1 year ago

          The fools who created Unix

          • Tja@programming.dev
            link
            fedilink
            arrow-up
            3
            ·
            1 year ago

            And C!

        • CanadaPlus@futurology.today
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 year ago

          What, could you have done better in 70-whatever?

    • Aatube@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Why so? It’s what it actually is

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 912 users / day
  • 4.55K users / week
  • 7.67K users / month
  • 20.2K users / 6 months
  • 15 local subscribers
  • 25.1K subscribers
  • 1.45K Posts
  • 34.2K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • adr1an@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org