digitalmars.D - Template news (2012+)
- Philippe Sigaud (37/37) Jan 04 2013 I've a tutorial on templates here:
- Philippe Sigaud (2/17) Jan 05 2013 No one can help me complete my list? Has any other thing changed
- Dmitry Olshansky (8/25) Jan 05 2013 Some new traits happened.
- Dmitry Olshansky (4/31) Jan 05 2013 --
- Philippe Sigaud (8/13) Jan 05 2013 I cannot find it.
- Dmitry Olshansky (5/18) Jan 06 2013 The link is botched and I dunno why. The usual ctrl+F (command+F)
- Philippe Sigaud (3/4) Jan 06 2013 ParameterIndentifier on std.tratis page reveals it for me.
- Andrej Mitrovic (4/6) Jan 05 2013 Don't use this yet. It's in 2.061 in a half-unusable state and no
- Philippe Sigaud (4/10) Jan 05 2013 Duly noted. I saw a pull pass a few days ago (after 2.061), I thought th...
I've a tutorial on templates here: https://github.com/PhilippeSigaud/D-templates-tutorial For the past few days, I transformed the LaTeX files into markdown files, which can then generate pdf, epub and html. Everything works well, that's cool [1]. I'm following Walter's advice from a year ago to provide text for people using e-readers/tablets. This post is not really an announce :) I'm correcting bugs & mistakes and seeing the good work the developers put into DMD. Several things that were flagged as impossible or buggy when I wrote the tutorial a year ago are now possible. Many other things have changed on the template front in 2012 and I need help to list them all, so as to update my doc. So, here is my own small list: - is(Type name = A!(Args), Args...) now exists. The Args... part is new. - the new (a,b) => a+b syntax was introduced - the eponymous trick works even when other non-eponymous members are defined - error reporting got better - CTFE got better. - auto ref? - __ctfe. I think it arrived just when I wrote the doc. I've now used it and it works great! - UFCS: not a template feature per se, but quite useful in conjunction with templates. - UDA. ditto, except I know zilch about them. But, type & value manipulation at compile-time, them I know. Other changes I'm not sure and that should be tested: - any change on __LINE__ and __FILE__? - any change for mixin templates? Do any of you see missing feature/modification that happened in 2012(-2013)? Philippe [1] I'm using pandoc to convert .md into .pdf, .epub, .mobi and .html and it works quite well. Also, its extended markdown syntax is nice. Here is an example of a real-world Haskell executable...
Jan 04 2013
So, here is my own small list: - is(Type name = A!(Args), Args...) now exists. The Args... part is new. - the new (a,b) => a+b syntax was introduced - the eponymous trick works even when other non-eponymous members are defined - error reporting got better - CTFE got better. - auto ref? - __ctfe. I think it arrived just when I wrote the doc. I've now used it and it works great! - UFCS: not a template feature per se, but quite useful in conjunction with templates. - UDA. ditto, except I know zilch about them. But, type & value manipulation at compile-time, them I know.No one can help me complete my list? Has any other thing changed in template-land in 2012?
Jan 05 2013
05-Jan-2013 22:58, Philippe Sigaud пишет:Some new traits happened. Not there is a way to peek at function parameter identifiers (!): + something else I might forgot in std.traits, it's worth revisiting + isPOD in compiler's __traits -- Dmitry OlshanskySo, here is my own small list: - is(Type name = A!(Args), Args...) now exists. The Args... part is new. - the new (a,b) => a+b syntax was introduced - the eponymous trick works even when other non-eponymous members are defined - error reporting got better - CTFE got better. - auto ref? - __ctfe. I think it arrived just when I wrote the doc. I've now used it and it works great! - UFCS: not a template feature per se, but quite useful in conjunction with templates. - UDA. ditto, except I know zilch about them. But, type & value manipulation at compile-time, them I know.No one can help me complete my list? Has any other thing changed in template-land in 2012?
Jan 05 2013
06-Jan-2013 00:32, Dmitry Olshansky пишет:05-Jan-2013 22:58, Philippe Sigaud пишет:s/Not/NowSome new traits happened. Not there is a way to peek at function parameter identifiers (!):So, here is my own small list: - is(Type name = A!(Args), Args...) now exists. The Args... part is new. - the new (a,b) => a+b syntax was introduced - the eponymous trick works even when other non-eponymous members are defined - error reporting got better - CTFE got better. - auto ref? - __ctfe. I think it arrived just when I wrote the doc. I've now used it and it works great! - UFCS: not a template feature per se, but quite useful in conjunction with templates. - UDA. ditto, except I know zilch about them. But, type & value manipulation at compile-time, them I know.No one can help me complete my list? Has any other thing changed in template-land in 2012?+ something else I might forgot in std.traits, it's worth revisiting + isPOD in compiler's __traits-- Dmitry Olshansky
Jan 05 2013
Some new traits happened.I'll have a look.Not there is a way to peek at function parameter identifiers (!):I cannot find it. Hmm, Jacob linked here: http://dlang.org/traits.html#parameterNames I cannot find it also. Undocumented?+ something else I might forgot in std.traits, it's worth revisitingI don't think I wrote something on std.traits per se (I dealt with __traits), but I'll see.+ isPOD in compiler's __traitsAh yes. This one is quite new.
Jan 05 2013
06-Jan-2013 02:12, Philippe Sigaud пишет:Some new traits happened. I'll have a look. Not there is a way to peek at function parameter identifiers (!): I cannot find it.The link is botched and I dunno why. The usual ctrl+F (command+F) ParameterIndentifier on std.tratis page reveals it for me.Hmm, Jacob linked here: http://dlang.org/traits.html#parameterNames I cannot find it also. Undocumented? + something else I might forgot in std.traits, it's worth revisiting I don't think I wrote something on std.traits per se (I dealt with __traits), but I'll see. + isPOD in compiler's __traits Ah yes. This one is quite new.-- Dmitry Olshansky
Jan 06 2013
Dmitry:The link is botched and I dunno why. The usual ctrl+F (command+F)ParameterIndentifier on std.tratis page reveals it for me. I swear I did that! OK, found it, and also ParameterDefaultValues.
Jan 06 2013
On 1/5/13, Philippe Sigaud <philippe.sigaud gmail.com> wrote:Don't use this yet. It's in 2.061 in a half-unusable state and no clear definition of what a POD is. Everything about that trait is uncertain at this time.+ isPOD in compiler's __traitsAh yes. This one is quite new.
Jan 05 2013
On Sun, Jan 6, 2013 at 5:45 AM, Andrej Mitrovic <andrej.mitrovich gmail.com>wrote:On 1/5/13, Philippe Sigaud <philippe.sigaud gmail.com> wrote:Duly noted. I saw a pull pass a few days ago (after 2.061), I thought that was it.Don't use this yet. It's in 2.061 in a half-unusable state and no clear definition of what a POD is. Everything about that trait is uncertain at this time.+ isPOD in compiler's __traitsAh yes. This one is quite new.
Jan 05 2013