Zenny
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
257m@lemmy.ml to Programming@programming.dev · 2 years ago

What are your programming hot takes?

message-square
message-square
1056
link
fedilink
330
message-square

What are your programming hot takes?

257m@lemmy.ml to Programming@programming.dev · 2 years ago
message-square
1056
link
fedilink
  • lefixxx@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    3
    ·
    2 years ago

    I like 1-index because its what I learned first, and you like 0-index because that’s what you learned first

    • Weirdfish@lemmy.world
      link
      fedilink
      arrow-up
      24
      arrow-down
      1
      ·
      2 years ago

      We just need to compromise, arrays start at 0.5

      • moreeni@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        Peak centrism

    • warlaan@lemm.ee
      link
      fedilink
      arrow-up
      12
      ·
      2 years ago

      My hot take: There is no such thing as 0-index. If you start with 1 it’s an index, of you start with 0 it’s an offset.

    • Giooschi@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      TBF everyone in school learn to start counting at 1, then they unlearn that in programming. There are also some objective reasons to use 0-based indexing https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html

    • mindbleach@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      I learned BASIC first, so… no.

      And 0-index is what’s real. If you have ever touched hardware that’s 1-indexed, your retro hobbies are even more esoteric than mine.

    • hex@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      i respect that

    • morrowind@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      I learnt 0-index, still think 1 is more intuitive

    • 257m@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      I like 0 index because it is 2hat is used under the hood. The index is not really an index but rather an offset from the array pointer.

Programming@programming.dev

programming@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: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

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

  • 8 users / day
  • 1.22K users / week
  • 3.04K users / month
  • 743 users / 6 months
  • 1 local subscriber
  • 16.1K subscribers
  • 1.32K Posts
  • 19.3K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • MaungaHikoi@lemmy.nz
  • UI: unknown version
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org