Wow so it turns out I was right, Javascript is a gross language that is impossible to read for anybody who isn't already familiar with its syntax.

I come from C/C++ and Python land when it comes to network request stuff, and I'm accustomed to code just executing one line after another. I can get used to the async stuff, but it's pretty damn frustrating that VS Code doesn't even have any indications to tell you when a function is going to be async or not.

There's also seemingly no immediately clean way to just say "don't continue, everything after this is going to rely on the result of this function".

Maybe I'm just bitching because I don't understand how await and Promises work.

#webdev #JS #html #async #raceCondition #programming

@riverpunk Personally, I think JS is probably one of the easiest entry points of asynchronous programming (compared to C (no high-level abstractions), C++/Python (new, complicated, difficult to use correctly). Asynchronocity is a hard problem that both programmers and language designers struggle with, and I don't think it's possible to have an async abstraction that doesn't add any cognitive overhead compare to synchronous programming

@lesley yeah. It seems JS is the way it is because it's solving a damn difficult problem in program logic.

So it's ugly because it's used to do complicated things. Still doesn't make it any more pleasant for me to interact with. I also wish there were better documentation for what the syntax actually means in terms that people coming from more procedural languages might be able to understand.

Maybe I just need strap in for the ride and learn to love the chaos, idk. I'm so much more comfortable in my little Python & C/C++ bubble of doing things linearly. It doesn't help that my program would technically work just fine without async, except that the library I'm using already built it in (for good reason, ofc).