178

Why😂😂😂😂

Comments
  • 6
    sick meme, I think i is for index
  • 6
    IIRC first versions of COBOL (or some other prehistoric language) had fixed, pre-defined variables of different types, "i" was the first integer.
  • 13
    In Mathematics the variables i,j,k,l where usually used to describe integers. Fortran took this convention and ran with it, in Fortran variables beginning with the letters I-N where of type Integer by default, which of course means that single letter I is the first "default" integer variable.
  • 3
    for (let thing of things) { ... }

    Okay?
  • 2
    ... or even this:

    things.map(thing => ...)
  • 4
    I learned assembly first, and then picked up C, which gave me a few strange habits and patterns. For example, I often used `a` or `c` as the for loop variable because it's called the accumulator, and in assembly it's common practice to use the cx register for looping.
  • 3
    Integer: i
    String: s
    Player: p
    <ClassName>: <ClassName>.lowerCase()[0]
  • 0
    @kamen or even things.map(t => ...)
  • 0
    @k0pernikus Yeah, but I think it makes more sense to give it a meaningful name; after all, you're not typing it two times like just the declaration row of a standard for loop, so IMO it doesn't hurt for it to be longer... unless you're doing something on a single row, when just one character can be okay.
  • 1
    not funny, pls, you can do better !
  • 1
    Wow i start as a meme and end up learning new things 🤗
    Big love #DR💙💙
  • 0
    in TI-BASIC i use S for loops (then T,U,V if something's nested.) No clue WHY, but I do. They're not even easiest to get to, they're just what I use...
  • 0
    Does anyone uses x, y, z?
  • 0
    Because index
  • 0
    use ii to make it explicit that its a loop variable.
  • 0
    And if i ia already taken, use j!
  • 0
    In our physics class when working with dimensions we used i, j, and k as for x , y, and z. Don't know if it's a physics thing or that our lecturer preferred to do it that way.

    So it might be in order to denote dimensions.
  • 1
    @creskendoll it's a math thing for unit vectors along the co-ordinate axes
  • 0
    _ for me..
  • 0
    Now, now, I've used j, k, l, and m before...

    ...in nested FOR loops.
  • 0
    No one will ever know.

    Unless it just simply means “iterate” or “iteration” which actually makes the most sense tbh.
  • 0
    Don't forget j for the inner for loop.
Add Comment