jdev - 2024-01-22


  1. lovetox

    javascript is nuts

  2. lovetox

    lets define a ton of common words as global variables and simply let any code access it without any special keyword

  3. moparisthebest

    Also: what is 'this'

  4. Zash

    `let that = this.bind(self)`

  5. lovetox

    i wonder how many footguns still await me while i learn this god forsaken language

  6. pep.

    Well you come from Python, you'll see it's just fine :P

  7. Zash

    you could always use one of the many (many) languages that compile to javascript

  8. lovetox

    i use typescript, it has no solution for this global var topic

  9. lovetox

    issue open since 2017 :)

  10. lovetox

    pep., thats the problem, i come from python, its like day and night

  11. lovetox

    on the plus side, i understand now better why python did some things

  12. lovetox

    for example prefix every use of a global var with a keyword "global"

  13. lovetox

    ending every line with a ";" gets also very old very fast

  14. jonas’

    lovetox, pro tip: pretend javascript doesn't exist.

  15. pep.

    I'd say the same of Python. Too many headaches.

  16. Zash

    expert pro tip: pretend computers don't exist

  17. lovetox

    its just got out of control, now they wrote a million libs and application with it, it will never go away

  18. Zash

    yes but also no

  19. lovetox

    and dont know if its just me, if i install something with npm and it downloads 67 dependencies, i feel diry

  20. lovetox

    and dont know if its just me, if i install something with npm and it downloads 67 dependencies, i feel dirty

  21. singpolyma

    > ending every line with a ";" gets also very old very fast This is optional in JavaScript, but please do it