72

Oh my GOD!!! 😡i cant believe it !! Wtf ?! Why Why :/ ?!

Comments
  • 28
    `this is also
    a multi line string.
    this string doesn't give two
    shits about converting
    a function
    into a string.`
  • 8
    I hope that dude was joking because that's the most stupid thing I ever saw...
  • 17
    That's fucking awesome.
  • 3
    @gitpush I tried it and it's real
  • 4
    getting AIDS is easy
  • 3
    @balte Not with ES5.
  • 10
    I'm disgusted and amazed at the same time.
  • 1
    \ 😑
  • 1
    @orseji that killed me
  • 1
    js lovers gonna (--) :))
  • 0
    makes config files totally redundant before the build
  • 6
    And then wondering why the minified version doesn't work.
  • 0
    python, we are looking at you...
  • 1
    This is why I fucking love JavaScript. Why would you ever want to do that? Nobody would ever need to do that. You can still do it.
  • 0
    What do you expect when you convert a function to a string? Why should this feature return a different content than one would expect?
  • 0
    It's actually kind of brilliant when you think about it.
  • 1
    This feature might not be appropriate for every situation of course. But I can imagine that one could use that for analytic purpose or even self-modifying code. I just think it's great what possibilities you have with this language.

    The downside is of course over use in inappropriate fields. But that's not the language's fault.
  • 0
    @McSebi what makes the language shit is that the string isn't unambigously marked as string. In C, you would enclose a string in ", and it would be clear what's a comment and what isn't.
  • 1
    Probably an answer to "Why humanity failed?", isn't it?
    I just wonder why it isn't accepted.
  • 2
    Just want to let you people know that I used that five years ago a lot for shitty UI templates.

    Pretty nasty, but it was the easiest way before actual template strings.

    Mine had even variable interpolation and oh boi, make sure it's globally exposed otherwise you cannot access it because it was just an eval().

    I wish I'd joke
  • 1
    @Fast-Nop no no no, that's how people end up blaming webpack or whatever bundler was used
Add Comment