We are starting the worst feature in JavaScript bracket.

First up - use strict vs #
Is the worst possible thing the file concatenation problem?

@southpolesteve TC39 gets some credit for making modules strict by default, but private is an unforced disaster.

I give private fields credit for working. Private doesn't make anything else worse.
use strict advances
Prototypical inheritance VS use strict

Me - nobody expects to mutate some global object! Developer hostile!

@holtbt "It's so bad we don't use inheritance - and that's good! No factory factories!"

@crandycodes - prototypical wins on two dimensions, bad and nobody uses it
Obligatory conversation about Small Talk is occurring.

Prototypical Inheritance is voted worse than use strict - but nobody likes use strict.
Class vs ==

@crandycodes - there's a difference between a badly implemented feature and something you just don't like.

@southpolesteve - I know you can use class without inheritance, but people just do.

@drosenwasser - class gives you a reasonable way to set up inheritance.
== voted worst for having no redeeming qualities.
Date parsing vs eval

@holtbt date parsing is horrible all the time. Eval has shining moments.

@southpolesteve I literally just avoid date features entirely.

Date parsing voted as worst.
Mutable date VS this

@southpolesteve this outside of the class context is a disaster - but I still hate class.

@crandycodes this has caused severe bugs and outages

this has caused production downtime for everyone.

We hate this much more than mutable date.
automatic semicolon insertion vs undeclared global variables

Sounds like undeclared globals is immediately way worse because asi is well solved by the ecosystem

asi is very difficult to explain - and that's bad.
@holtbt No downtime due to ASI, but definite downtime due to global variables.

@southpolesteve downtime is a big argument for me

@runfaster2000 - doesn't ASI have the same problem as use strict with concatenation? (.NET team is fast on the uptake here :-))
Undeclared globals is worst.
const vs typeof null

People are okay with const.

@drosenwasser - typescript benefits from const.

@holtbt - you learn const and then it's not a big deal

typeof null is worst.
import {} from "" vs hoisting

@drosenwasser import {} ruins autocomplete story, you have to walk backward after you fill in the ""

Me - hoisting, just not how you would expect it to work.

@drosenwasser - hoisting is good, you can build a core idea and then iterate on it
@drosenwasser is passionate here.

import {} from "" goes forward - we like the way python does it.
null vs sort()

Let's get into religious wars - should null exist?

Everyone hates null. HATES.

Sort is nuanced

@southpolesteve if you use sort, it just does some stuff! You can pass in a comparator, and then sort works - sometimes.

We think null is worst but also hate sort
null vs with

@holtbt with was so bad that it just went out in an inferno

@ramyanexus I've never even used with.

@holtbt It was used in chrome dev tools until recently

null continues to suck.

Null is worst.
In the second round!

Prototypical inheritance vs ==

@crandycodes likes the prototypical inheritance

@runfaster2000 believes 'downtime caused' is a great metric

@ramyanexus == gives false confidence

@holtbt hates everything that came from Ruby to JS
At the end of the day downtime metric rules

We hate == more.
Date parsing vs this

In JS, this can refer to the functions parent scope, which might not be a class. You can attach a function to a specific this. You can orphan this in JS. You can bind this to random things.

@holtbt it has to be this - you run into this every time
Me - there are great libraries for date parsing!

No good alternatives for this.

@runfaster2000 date parsing is inherently complicated. this doesn't need to be.

this goes forward, it's the worst.

@drosenwasser this is fine
typeof null vs undeclared globals

@holtbt typeof null === "object" is just wrong!

this one was easy. typeof null
import {} from "" vs null

again we just hate null. hate it.

easy.

@crandycodes - something that's inconvenient vs something that actually sucks.
Getting into final rounds!

this vs ==

@holtbt == is a referendum on JS coercion in general

@southpolesteve this is sometimes needed, == could leave forever

@ramyanexus == bites you once. this gets you every time.

@holtbt one you need ESLint for, the other you need TS for
Me - I side with @ramyanexus - this is forever.

@crandycodes fixing == is easy, this is not

@southpolesteve if you have code that depends on == it's pretty awful to fix
Side note - we started with 18 features we didn't like, and we're just thinking of more.

@crandycodes wants to make a 'controversial features'

this goes forward because you HAVE to use it.
We have landed at

typeof null vs null
if you eliminate null, you eliminate typeof null!

@holtbt typeof null is just bad, you can debate null

typeof null goes forward!
Final round!

this vs typeof null

@holtbt I avoid typeof null, you can't avoid this

@southpolesteve I have not had to use this in a long time

@drosenwasser typeof null justifies my job
(He's on the typescript team - FYI)
@holtbt I have to teach this - in the wild people have to use it all the time

@southpolesteve I really hate classes, so I want to give this to this. But they're both so bad.

Me - this is foundationally bad. typeof null is a bug.
Decided!

this

is the worst feature in javascript.
Bracket!
You can follow @maggiepint.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: