[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/... - Наука та технологія
Thanks a lot for this great video 😊
Cheers, you are most welcome!
Nice Mike!
Cheers!
can you get the Args passed as some kind of string that you can parse at compile time?
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
@@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
NOT first!!!
Next time :)