Besides, I feel like if I really want a strong type system https://reasonml.github.io/ might be the better choice over flow.
73 karma · joined September 14, 2016
Besides, I feel like if I really want a strong type system https://reasonml.github.io/ might be the better choice over flow.
I think that for whomever is developing using electron in most cases the desktop versions of the apps wouldn't even exist if electron wasn't a thing. Also, just as a side note, electron apps are so _easy_ to develop. I don't know if any other platforms that target desktop are as simple, but I might just be out of the loop.
[...new Set([{x: 1}, {x: 1}])] [1, 1, 2, 3, 4].filter(
(obj => x => {
if (obj[x]) {
return false;
}
obj[x] = true;
return true;
})({}),
);
What's happening is that you're passing an object (hashmap / hashset) into a function that returns a filtering function, and that object is used inside the closure to track the dupes. It's still a pure function because even though you're mutating the passed in object, the filtering function is still deterministic and referentially transparent.* Why are you doing some unintuitive scroll-jacking?
* Why are you using React for literally a single scrollable page?
* Why are you putting the scroll position into the URL instead of somewhere like local storage? It's annoying that I can't even leave the page without pressing back multiple times.
ugh
You can learn one before the other and a lot of the skills are transferable.
1. By far, has the largest ecosystem.
2. If you use a linter, a typechecker (TS or flow), and transpile your code (TS or babel or both), JavaScript is actually a pretty nice language to work in.
Sure it's a chore to set up all the initial tooling, and learn the ins and outs. However, once you're past that, it's usually not worth it to switch.
Also lets not pretend that having a bunch of quirks like these is exclusive to JS. I'd say there are equally as many ways to shoot yourself in the foot in many other languages. For example, for C++, which isn't necessarily beloved but people don't want to "eradicate" like OP's comment states about JS, you can have an entire talk[0] on the quirks of type deduction.
I think where JavaScript earns its bad reputation isn't necessarily its quirks, but its quirks in combination with a low barrier to entry, lots of beginners, a large community, being a multi-paradigm language, and the fact that most people writing it were forced to write it because it's the language of the web not because they wanted to. All that in combination results in a lot of bad code...but if you take the time to learn it and use a bunch of tooling (which isn't ideal), it's actually quite nice.
I know a lot of people view using so much tooling as a con of the language, but if you use Babel + Eslint + Flow/Typescript, JavaScript becomes a lot nicer and safer to program in. For small to mid-sized projects, I think JavaScript is pretty great.
I read through https://github.com/singer-io/getting-started/blob/master/SPE..., but I'm trying to better understand why they're necessary.
I know it's probably been done before, but the goal of the project is to familiarize myself with parsers, multithreading, making a C++ project in general, and the newer features of C++11/C++14.