• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle

  • I dunno that much about web dev, but from my understanding:

    Why the hell is semicolon sometimes needed, sometimes optional?

    I think that’s called ASI if you haven’t come across the term already. Semi-colons are less like “optional”, and more like the JS parser takes its best guess as to where semi-colons should go in addition to explicit ones.
    Personally, I prefer to leave code formatting decisions like that to an opinionated formatter like Prettier and just never think about it again.

    What the fuck is anonymous/arrow function? Why do I have to make a function only to be used once?

    These are trappings of functional programming. If you’re learning this stuff mostly for fun, I can recommend taking a detour to dabble in a purely(-ish) functional language for at least a little bit. It’ll probably be even more of a head-scratcher than JS, but it should quickly become obvious as to why anonymous functions are a handy convenience. More importantly it forces you to conceptualize a problem from a functional approach, which you might otherwise avoid in more popular multi-paradigm languages since it’s unfamiliar.

    As for why functional programming is handy, there’s doubtless more thorough and knowledgeable primers on the web, but as for me the two big ones that immediately come to mind are:

    • New avenues for separation of concerns. I think a typical example to point out is sorting: FP makes it trivial to separate the sorting algorithm from how you want the data sorted, you just pass a comparison function alongside the data, which the sorting algorithm then repeatedly calls.
    • Concurrency safety. Purely functional solutions are basically impossible to shoot yourself in the foot with as far as parallelism. More realistically, with unpure solutions the more you can borrow from a functional approach, the fewer avenues you have to shoot yourself in the foot with respect to parallelism.

    For JS, lifetimes and scope seem like they’d be kind of unwieldy, without knowing a bit about FP and more specifically closures.





  • Elyusi, Kei@burggit.moetoGeneral@burggit.moeToy OS
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    As someone who moonlights as a Windows apologist (I use Linux everywhere but my gaming rig), this feels expected and doesn’t bother me much. It seems like power users can still get these options back by editing registry keys, which is pretty par for the course on legacy stuff. And I do think all of these options are for things that look dated compared to the streamlined look W11 is attempting to project.

    Now, the circled ones are obvious no-brainer nice-to-haves that I will for sure be reenabling. But approaching things from the other side, I want to point out that the average LUser is pretty unsavvy. And seeing as mobile dominates the market share → “thought share” of OSes, I think comparing the way Windows does things to mobile makes it pretty clear as to why even having these options is going the way of the dodo for general users.

    “Toy OS” is 100% correct, but that’s what people want for better or worse.🤣

    Oh, but also my gut instinct tells me that removing “show drive letters” isn’t going to live past this beta “Insider Release” (YAY!™ branding! 🙂). That just feels like it opens up too much of a potential extra speedbump for over-the-phone support to be worthwhile.