Strings In Ziglang | No Talking Asmr Coding

Поделиться
HTML-код
  • Опубликовано: 22 дек 2024

Комментарии •

  • @anub-e9y
    @anub-e9y 2 месяца назад

    Great Video ! Just one nitpick, your `str` that is in global scope is not stack allocated, it's in the data section and compiled with your program :D

    • @xfxpositions
      @xfxpositions  2 месяца назад

      @@anub-e9y lol, you're right. It's in .data lol

  • @trypophobia7497
    @trypophobia7497 2 месяца назад

    Thanks for the video. Tell me, please, is there a closure function and a lambda function in the zig?

    • @xfxpositions
      @xfxpositions  2 месяца назад

      I don't think that would be too useful, but this link might help you as well
      ziggit.dev/t/anonymous-functions-lambdas/1087

    • @Presenter2
      @Presenter2 4 дня назад

      Well, not exactly. You can pass functions as values, using either a function pointer (* const fn(...) ...) or a function body (fn(...) ...). I am not sure if they capture their environment though.

  • @joebuydem
    @joebuydem 2 месяца назад

    Good stuff. Y why don’t u just defer the freeing of the allocation why are you init it with _ ?

    • @xfxpositions
      @xfxpositions  2 месяца назад

      I've used to use that. Probably older versions was wanting it?