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

      @agressivelyPassive @beejjorgensen ehm, not really. Comprehensions [I didn’t even know they are called as such for a long time] ale light years ahead of any abstraction provided by Fortran, and unfortunately also C (maybe not so C++, which is dangerous and versatile beast).

      The core concepts of Python are two or three generations newer than that of Fortran.

      • AggressivelyPassive@feddit.de
        link
        fedilink
        arrow-up
        3
        ·
        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
          link
          fedilink
          arrow-up
          0
          ·
          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.

      • Beej Jorgensen@lemmy.sdf.org
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Compensations are light years behind whatever’s coming next. 🙂 And I don’t think of them as “core”. They’re practically syntactic sugar. If you can write a comprehension but can’t write a loop with a conditional in Python or FORTRAN, you’re missing the core.

        • xChaos 🐧🚀🐘🚲@f.cz
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          @beejjorgensen I spent so many time writing manual loops even in Basic, sometimes in ASM (on Z-80) later in C, but actually, abstraction level of manually written loops is relatively low.

          Ok, core concept in Python are iterable objects. Iterable objects are much, much more advanced abstraction, than manual loop - I and yes, I have spent many, many years writing manual loops again and again, later I added some macros, but still - in Python, it is not only less keystrokes, but the iterable object abstraction is something, which was absent in Fortran and C (maybe not in C++, but C++ was mostly pain)

          Syntactic sugar poured on iterable objects is maybe not so important, but in enviroments without certain core concepts, no amount of syntactic sugar will fix that.

          Think of it as it was in Basic: it had no pointers (unless you wished to peek and poke memory manually). C had pointers and pointer aritmetics, which was powerful abstraction, compared to Basic. You would need to manually call peek() function to read pointer… well, technically possible, but you would read one byte at a time, with no clue about data type, etc). C pointer is not just syntactic sugar over peek(), it is much more than that.

          And there are more and more such powerful abstraction, which are just absent in older languages. You can eg. call try ~ except (or catch, or whatever) syntactic sugar - well, maybe it is, but is sugar coated setjmp()/longjmp() call of libc, not sugar coated goto, as it may seem at the first glance…