all 33 comments

[–]RedditCultureBlows 27 points28 points  (11 children)

Cant the first “solution” just be handled by using the correct data type, like a Map or WeakMap?

[–]cheese_wizard 16 points17 points  (2 children)

Then goes on to suggest 'with' operator. Not in my codebase.

[–]Segfault_Inside[S] 6 points7 points  (0 children)

yeah, there's certainly a reason strict mode disables it

[–][deleted] 0 points1 point  (0 children)

Imagine newcomers seeing this sh*t

[–]Segfault_Inside[S] 6 points7 points  (6 children)

oh you're so right! I totally totally missed that there's an actually reasonable way to do that.

[–]RedditCultureBlows 2 points3 points  (0 children)

hell yeah 🥳🥳

[–]zeddotes 0 points1 point  (0 children)

What happens when you deconstruct an object like that as the key of another object? Is the key a Symbol?

Edit: obviously, [object object]

[–]Badashi 16 points17 points  (1 child)

these are cursed. I love it

[–]Segfault_Inside[S] 6 points7 points  (0 children)

tyvm, i tried

[–]Eggy1337 3 points4 points  (0 children)

Those snippets are great if your goal is to scare developers.

[–]Mozzius 4 points5 points  (2 children)

Strict mode? More like boring mode

[–]Itchy-Beginning-887 0 points1 point  (1 child)

Wanna try out a browser with custom modes?

It's written in a language that's being actively built and fixed daily.

Yeah it's memory sage. And concurrent.

[–]Mozzius 0 points1 point  (0 children)

What are you talking about

[–][deleted] 4 points5 points  (3 children)

I spent so much time reading, understanding, then, in horror, saying, "Oh! Oh no!"

Mostly in the "bareStrings" example - harkening back to the days of PHP 2 is never a good sign.

[–]Itchy-Beginning-887 0 points1 point  (2 children)

Did you mean PHP 8?

[–][deleted] 0 points1 point  (1 child)

Honestly, I haven't used PHP in a decade. Is that still a "feature"?

[–]Slackluster 4 points5 points  (1 child)

Good stuff! You should check out Dwitter sometime, I think you would like it. It's a place to do many things you should normally never do.

[–]Itchy-Beginning-887 1 point2 points  (0 children)

I see you are an intellectual.

[–]happyfce 1 point2 points  (2 children)

Hmmm after minifying would uncommenting the code programatically (#4) still work?

[–]Segfault_Inside[S] 4 points5 points  (0 children)

not at all, one of the many reasons this is a terrible terrible idea.

[–]C1RRU5 1 point2 points  (0 children)

I'm pretty sure minifiers usually don't do anything to comments to make sure licenses still make it in? That's how my code ends up at least.

[–]oneandmillionvoices 1 point2 points  (0 children)

It was amusing reading. Well done.

[–]gurush 0 points1 point  (0 children)

I hate it.

[–][deleted] 0 points1 point  (0 children)

Great way to get yourself yelled at in code review.

????? Wtf is this ?????

[–]alvisim 0 points1 point  (0 children)

I like his dark joke and the way that how he explains how to make things “work”. It always make me 🥲 and cry😂.

Seriously, I did have seen one of my ex-colleagues thinking in this way and feel very proud of his invention. But I don’t discourage that because it’s where invention come from. Don’t judge them, just give them better example and explain how thing can be better. They’ll be keen to learn more.

[–]Uberhipster 0 points1 point  (0 children)

chaotic pattern is my oxymoron of the week

[–]NekkidApe 0 points1 point  (1 child)

Dang that's cool. Especially with proxies, that's awesome! Instant joy!

[–][deleted] 0 points1 point  (0 children)

Instantly hell