55 karma · joined July 21, 2020
Note: my original comment said “JWT”
TL;DR It's great, but if you're interested you should use Colemak. Once you switch you won't go back.
There is always a balance here. I'm not saying to never extract a named function, and there is certainly good reason to do that, especially if the function is called elsewhere or is quite complex.
But, in many cases, the inline logic is more readable because it's right there, and the function really doesn't need a name.
https://nodejs.org/api/timers.html#timerspromisessettimeoutd...
Totally agreed! I wish JS had if expressions (maybe in the future?). It doesn't seem like such a huge change if it were rolled out slowly like other new syntax features but maybe I have no idea what I'm talking about.
Hopefully things like `run` can help move the needle on this. I like it because it feels more FP and intentional than IIFE's everywhere.
Its not about number of characters, its about reasoning that the inline function that you just wrapped in parens is then called later, potentially after many lines. At least with `run` it's immediately clear based on the name that you are running the function.
Edit: This is pretty funny. I'm a parensaphobe! (not really) https://www.reddit.com/r/ProgrammerHumor/comments/qawpws/the...
Part of the beauty of `run` is that you don't have to declare and name a function `calcX`. In longer and more complex examples, declaring a function inline like this is potentially confusing because you don't get to see where it is used, whereas with `run` you assign the return value immediately to a variable.
But to cap it at just Chrome like its 2012 when browser compatibility has come such a long way is likely unnecessary and frankly lazy on their part. I can't think of an API that they definitely would need to use that isn't in Firefox.
Update: It works totally fine on Firefox if you use an extension to lie about your user agent. What a joke.
Rooted Farmers is an agricultural technology startup dedicated to providing small farms with the tools and resources necessary for growing and scaling their businesses. We serve as an online sales platform, connecting farmers with local businesses and shoppers.
Rooted is comprised of a small but growing team of passionate doers based in the Northeast. We are seeking a mission-driven Software Engineer who is committed to empowering women-led businesses; you will be responsible for tackling major development projects, building simple and beautiful application interfaces, and expanding the company's technical infrastructure.
Requirements:
- 1+ years experience with Typescript (Node.js and React)
- Previous work or internship experienceRooted Farmers is an agricultural technology startup dedicated to providing small farms with the tools and resources necessary for growing and scaling their businesses. We serve as an online sales platform, connecting farmers with local businesses and shoppers.
Rooted is comprised of a small but growing team of passionate doers based in the Northeast. We are seeking a mission-driven Software Engineer who is committed to empowering women-led businesses; you will be responsible for tackling major development projects, building simple and beautiful application interfaces, and expanding the company's technical infrastructure.
Requirements:
- 1+ years experience with Typescript (Node.js and React)
- Previous work or internship experience