[Dlang Episode 88] D Language - Templates - Part 5 of n - Variadic Templates (i.e. Seq Parameters)

Поділитися
Вставка
  • Опубліковано 19 кві 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 show you how to use variadic templates. Variadic templates are a powerful tool for doing computation at compile-time. Variadic templates pragmatically are also the mechanism that allows you to specify any number of arguments without having to define many variations of the same templated user defined type or function. In this lesson, I'll also provide a little bit of a sneak peek into some compile-time features of the D language that work quite nicely with templates.
    ►Please like and subscribe to help the channel!
    ►UA-cam Channel: / mikeshah
    ►Join our free community: courses.mshah.io/communities/...
  • Наука та технологія

КОМЕНТАРІ • 9

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

    Thanks a lot for this great video 😊

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

      Cheers, you are most welcome!

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

    Nice Mike!

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

    can you get the Args passed as some kind of string that you can parse at compile time?

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

      Can always use a mixin (e.g. enum args = mixin(import("somefileAsString.txt")); (Need to compile with '-J ./path/to/someFileAsString.txt'). There's probably other more clever ways to pass flags to the compiler however. There is an @cmdfile -- though that looks more of a hack to me: dlang.org/dmd-linux.html

    • @androth1502
      @androth1502 Місяць тому

      @@MikeShah hmm. sounded interesting, so i poked around and found something even more interesting. i never knew sc.ini existed! thanks.
      dlang.org/dmd-windows.html#sc-ini

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

    NOT first!!!