[Dlang Episode 86] D Language - Templates - Part 3 of n - value parameters, and alias and typeof

Поділитися
Вставка
  • Опубліковано 15 кві 2024
  • ►Full DLang Series Playlist: • D Language (DLang) Pro...
    ►Find full courses on: courses.mshah.io/
    ►Join as member to get perks: / @mikeshah
    ►Lesson Description: In this lesson I we will continue discussing templates, but revisiting some previous concepts. I will introduce the idea of a 'value parameter' (i.e. a 'string') that can be evaluated at compile-time and then templated. We'll then look at arrays as a template type, and also using the 'typeof' operation to deduce the type for us as a template argument. Finally, we'll look at using 'alias' that is useful for defining a common instantiation of a template.
    ►Please like and subscribe to help the channel!
    ►UA-cam Channel: / mikeshah
    ►Join our free community: courses.mshah.io/communities/...
  • Наука та технологія

КОМЕНТАРІ • 10

  • @kcvinu
    @kcvinu 2 місяці тому +2

    Much waited series. I was struggling with Philippe Sigaud's tutorial. And at a point, I decided not to use much more templates in my code. Now, I think I have a chance to learn more about templates.

    • @MikeShah
      @MikeShah  2 місяці тому

      Cheers! Templates are one of D's super powers, so knowing some of the basics are very useful. Eventually we'll do some neat meta programming things as well :)

  • @Chupe_chupe
    @Chupe_chupe 2 місяці тому +1

    Great video

  • @user-fz6yn3sb4s
    @user-fz6yn3sb4s 2 місяці тому

    great video sir , i have been following you since Aug 23 , i have a request can you start a playlist for efficient programming , just like for embedded C , where a little memory is there , good technique like hashing etc etc
    thanks a lot for your effort to make great content

    • @MikeShah
      @MikeShah  2 місяці тому

      Cheers! As I finish up some other series, I will consider more performance programming series :)

  • @bsdooby
    @bsdooby 2 місяці тому +1

    why is `T array` not sufficient as `T` is `T[]`? Is this the type contract?

    • @MikeShah
      @MikeShah  Місяць тому +1

      I think 'T' alone is fine if you want any type. T: T[] if you want an array type for a specialization.

  • @GaryChike
    @GaryChike 2 місяці тому +1

    First!!!!

    • @MikeShah
      @MikeShah  2 місяці тому +1

      2 in a row!!