• AggressivelyPassive@feddit.de
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    1 year ago

    Comprehensions are just shorthands, nothing more. You can unroll into loops on a syntactical level.

    But the fact that you think like that, shows to me, that you actually don’t understand the core concepts behind languages.

    At the end, each language compiles to assembly, and all the fancy features are just different ways of encoding assembly.

    • xChaos 🐧🚀🐘🚲@f.cz
      cake
      link
      fedilink
      arrow-up
      0
      arrow-down
      2
      ·
      edit-2
      1 year ago

      @agressivelyPassive ok, comprehensions are just syntax, but still, they still allow producing new arrays directly from iterable objects, without need to store them in temporary arrays, which counts as added abstraction.

      Basically I agree, that there are concepts which are simply not available in certain runtime libraries/interpreters, like multithreading or lazy evaluation. So I more or less agree, that syntax is not so important and we should categorize the underalying abstractions, accessible by syntax (or whatever).

      But at least memory management abstractions of Python are very different from Fortran or C (ok, you can use many different libraries for that in C, but you will hardly get reference counting and automatic clenaup of unreferenced objects and so, and this not just syntax issue… it is automation issue…)

      • AggressivelyPassive@feddit.de
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        And nothing of that has anything to do with understanding core concepts. Threads are native CPU constructs, they don’t just exist because of a library. Memory management is nice, but also not arcane knowledge that can only be learned by going to a university.

        A C dev learning dependency injection and a Java dev learning manual memory management will both have to learn something new, but for neither it should fundamentally change how they think about computers.

        Again, you seem not to understand what’s actually going on under the hood. There is not a single language concept that a regular dev in another language couldn’t understand. It’s all just “make compiler write assembly so computer go brrr”. That doesn’t mean it’s trivial to be proficient in a new language, but that was never the goal of any higher education. It’s called computer science, not advanced button pressing.