[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/... - Наука та технологія
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.
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 :)
Great video
Cheers!
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
Cheers! As I finish up some other series, I will consider more performance programming series :)
why is `T array` not sufficient as `T` is `T[]`? Is this the type contract?
I think 'T' alone is fine if you want any type. T: T[] if you want an array type for a specialization.
First!!!!
2 in a row!!