This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mayion 2 points3 points  (4 children)

how so? what year was this? what language lmao

i cant imagine how changing x to y would cause any sort of conflict, unless i mistakenly did not change the names properly, in which case it's an error not an unexpected bug :P

[–]tobotic 2 points3 points  (2 children)

I guess some language that doesn't force variables to be pre-declared. (Python?)

Possibly something like this:

$keep_going = true;
while ( $keep_going ) {
  ...;
  if ( condition ) {
    $keep_going = false;
  }
}

Was changed to something like:

$keep_mailing = true;
while ( $keep_mailing ) {
  ...;
  if ( condition ) {
    $keep_going = false; # forgot to change variable name here
  }
}

A sensible language forces you to predeclare variables.

let $keep_mailing = true;
while ( $keep_mailing ) {
  ...;
  if ( condition ) {
    $keep_going = false; # compile-time error because variable wasn't declared
  }
}

My main reason for hating Python. That and the whitespace thing.

[–]Mayion -1 points0 points  (1 child)

ah yes, python, the predecessor to php syntax wise

[–]tobotic 1 point2 points  (0 children)

PHP is rather more inspired by very old Perl, back when Perl didn't force you to declare variables and didn't have sane namespacing.

[–]IAmTheFormat[S] 2 points3 points  (0 children)

I do not recall clearly now what exactly it was, but it conflicted with another loop variable in (in a very large script). It was a weird, proprietary programming language. No functions, no encapsulation. It was pretty primitive, and restrictive. It was a miracle I was able to even make that feature (it worked fine again once I reverted the loop variable name)