Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
balte22916y`this is also
a multi line string.
this string doesn't give two
shits about converting
a function
into a string.` -
devios157016yThis 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.
-
McSebi5006yWhat do you expect when you convert a function to a string? Why should this feature return a different content than one would expect?
-
McSebi5006yThis 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. -
@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.
-
beleg31406yProbably an answer to "Why humanity failed?", isn't it?
I just wonder why it isn't accepted. -
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 -
@Fast-Nop no no no, that's how people end up blaming webpack or whatever bundler was used
Related Rants
Oh my GOD!!! 😡i cant believe it !! Wtf ?! Why Why :/ ?!
joke/meme
javascript
js
rant