The world's first Lambda Functions in C?

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • Lambda functions (or "arrow functions") are one-line-functions that you put in the middle of your code. They are nameless and they can make your programs very elegant.
    They originate from functional languages like Haskell, but most big languages have adopted them lately, in some form or another. Not C, though. But in this episode I try to leverage some new features of the C language along with some macro magic, to create my own implementation of Lambda functions.
    As far as I know, noone else has been able to do this in C, at least not in any real sense.

Komentáře • 18

  • @discontinuity7526
    @discontinuity7526 Před 2 měsíci +1

    This is super neat man, first in the world of something that is now very modern programming, would love to see generics too!

    • @dr-Jonas-Birch
      @dr-Jonas-Birch  Před 2 měsíci +1

      Hi Discontinuity, thank you, generics is actually quite possible using some preprocessor macro magic. I plan on doing an episode on that subject later.
      JB

  • @elzeroquantumschool1607
    @elzeroquantumschool1607 Před 2 měsíci +2

    I really appreciate your efforts for those valuable videos

  • @adityawaghaskar4250
    @adityawaghaskar4250 Před 2 měsíci +1

    Happy to see you again.

    • @dr-Jonas-Birch
      @dr-Jonas-Birch  Před 2 měsíci +1

      I'm happy to see you too, Adit, and I'm happy to be back! JB

  • @minma02262
    @minma02262 Před 2 měsíci

    Sorry to hear your breakup. Hope you get well soon. 🙏🙏🙏

    • @dr-Jonas-Birch
      @dr-Jonas-Birch  Před 2 měsíci +1

      Thank you Minma, that's very considerate. Im more or less through it already, JB

  • @NimaqAlizadeh
    @NimaqAlizadeh Před 2 měsíci

    tnx🎉

  • @onaecO
    @onaecO Před 2 měsíci

    ❤️

    • @dr-Jonas-Birch
      @dr-Jonas-Birch  Před 2 měsíci

      Thank you Oceano, a heart from you is of great value to me. Take care, JB

  • @its_code
    @its_code Před 2 měsíci

    ❤❤❤😊

  • @void_ptr32
    @void_ptr32 Před 2 měsíci +1

    sry for ur breakup. hope ur ok

    • @dr-Jonas-Birch
      @dr-Jonas-Birch  Před 2 měsíci +1

      void* that's life, you know, I'll carry on. Thank you, though. That is very considerate. Take care. JB

    • @dr-Jonas-Birch
      @dr-Jonas-Birch  Před 2 měsíci +2

      @void_ptr32 hope to see you Friday at the live stream czcams.com/users/liveFFxEoQyNQKM
      Take care, JB

    • @void_ptr32
      @void_ptr32 Před 2 měsíci

      @@dr-Jonas-Birch ill be there sir!

  • @PolarisMyWay
    @PolarisMyWay Před 2 měsíci

    Doesn't work at all!. You probably have very old gcc compiler.

    • @dr-Jonas-Birch
      @dr-Jonas-Birch  Před 2 měsíci

      It works indeed. Try compiling with -std=c2x
      JB