78
Shahriar
67d

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

Comments
  • 32
    `this is also
    a multi line string.
    this string doesn't give two
    shits about converting
    a function
    into a string.`
  • 12
    I hope that dude was joking because that's the most stupid thing I ever saw...
  • 19
    That's fucking awesome.
  • 3
    @gitpush I tried it and it's real
  • 5
    getting AIDS is easy
  • 5
    @balte Not with ES5.
  • 13
    I'm disgusted and amazed at the same time.
  • 13
    Functional driven commenting.
  • 1
  • 2
    @orseji that killed me
  • 1
    js lovers gonna (--) :))
  • 0
    makes config files totally redundant before the build
  • 8
    And then wondering why the minified version doesn't work.
  • 0
    python, we are looking at you...
  • 3
    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.
  • 1
    To explain: JS parser is actually putting comments in its AST. Why in the name of god would they do that!!?
  • 1
    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
Your Job Suck?
Get a Better Job
Add Comment