rockerest’s avatarrockerest’s Twitter Archive—№ 17,482

  1. I think they should add a keyword to JavaScript that allows reassignment, since that's what these values are: they can vary! Haha just spitballing here but maybe we can use var for "variable"?? Just an idea lol lmao rofl tylermcginnis/1443265084470427650
    1. …in reply to @rockerest
      Just theorizing here, but maybe "I want to use a thing that doesn't allow reassignment in a way that allows reassignment" indicates a substantial misunderstanding of the language and maybe "we'll let you reassign the thing that doesn't allow reassignment JUST THIS ONCE" is bad.
      1. …in reply to @rockerest
        1. …in reply to @rockerest
          There are going to be SO many bugs reports that code that people found on StackOverflow works when they try it in the browser but explodes spectacularly when they put it in their app. I - for one - can't wait for the inevitable JS change that makes const reassignable.
          1. …in reply to @rockerest
            At that point you'll just be writing let but with more letters and misdirection, so why not just use let? And let is functionally identical to var in the vast majority of use-cases, so why not just use var, since what you want is a variable? Direct, and to the point.