Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 18, 2006 SDWest paper "Templates Revisited" now available | ||||
---|---|---|---|---|
| ||||
www.digitalmars.com/d/templates-revisited.html |
March 18, 2006 Re: SDWest paper "Templates Revisited" now available | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> www.digitalmars.com/d/templates-revisited.html
>
>
Nice! not that I'm into templates or anything ..
note: somethings are duplicated, for example, this segment:
-------
Partial and explicit specialization work as they do in C++, except that there is no notion of a 'primary' template in D. All the templates with the same name are examined upon template instantiation, and the one with the best fit of arguments to parameters is instantiated.
Specialization
Partial and explicit specialization work as they do in C++, except that there is no notion of a 'primary' template. All the templates with the same name are examined upon template instantiation, and the one with the best fit of arguments to parameters is instantiated.
--------------
and this one:
----------
import std.stdio;
import regex;
void main()
{
auto exp = ®exMatch!(r"[a-z]*\s*\w*");
writefln("matches: %s", exp("hello world"));
}
What follows is a cut-down version of Eric Andertons regex compiler. It is just enough to compile the regular expression above, serving to illustrate how it is done.
-------------------
|
March 18, 2006 Re: SDWest paper "Templates Revisited" now available | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> www.digitalmars.com/d/templates-revisited.html
So, how did it go? :)
|
March 18, 2006 Re: SDWest paper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <dvgeh5$18j9$1@digitaldaemon.com>, Walter Bright says... > >www.digitalmars.com/d/templates-revisited.html > > Very cool stuff! For v0.149, I had to change 'const sqrt' to 'const real sqrt' and 'const hash' to 'const real hash' for those examples. Also on Linux for the sqrt example, I'm getting these linker errors: t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee78d9befa33f304b5ff3fVi4Z4sqrte+0x0): multiple definition of `_D1t38__T4sqrtVi2Vee78d9befa33f304b5ff3fVi4Z4sqrte' t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee78d9befa33f304b5ff3fVi4Z4sqrte+0x0): first defined here t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee05050505050505b5ff3fVi3Z4sqrte+0x0): multiple definition of `_D1t38__T4sqrtVi2Vee05050505050505b5ff3fVi3Z4sqrte' t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee05050505050505b5ff3fVi3Z4sqrte+0x0): first defined here t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee56555555555555b5ff3fVi2Z4sqrte+0x0): multiple definition of `_D1t38__T4sqrtVi2Vee56555555555555b5ff3fVi2Z4sqrte' t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee56555555555555b5ff3fVi2Z4sqrte+0x0): first defined here t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee05050505050505b5ff3fVi3Z4sqrte+0x0): multiple definition of `_D1t38__T4sqrtVi2Vee05050505050505b5ff3fVi3Z4sqrte' t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee05050505050505b5ff3fVi3Z4sqrte+0x0): first defined here t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee00000000000000c0ff3fVi1Z4sqrte+0x0): multiple definition of `_D1t38__T4sqrtVi2Vee00000000000000c0ff3fVi1Z4sqrte' t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee00000000000000c0ff3fVi1Z4sqrte+0x0): first defined here t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee56555555555555b5ff3fVi2Z4sqrte+0x0): multiple definition of `_D1t38__T4sqrtVi2Vee56555555555555b5ff3fVi2Z4sqrte' t.o(.gnu.linkonce.d._D1t38__T4sqrtVi2Vee56555555555555b5ff3fVi2Z4sqrte+0x0): first defined here Thanks, - Dave |
March 18, 2006 Re: SDWest paper "Templates Revisited" now available | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> www.digitalmars.com/d/templates-revisited.html
Interesting paper, it really makes me wish that the
templates were actually working on my Mac OS X 10.3...
It's working with GCC 4.x, just that I'm not there yet.
(guess we need a port for GCC 3.x, from Apple's sources)
So for now, I'll just have to stay clear of them... :-(
--anders
|
March 18, 2006 Re: SDWest paper "Templates Revisited" now available | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars Ivar Igesund | "Lars Ivar Igesund" <larsivar@igesund.net> wrote in message news:dvgjoj$1nd2$1@digitaldaemon.com... > Walter Bright wrote: > >> www.digitalmars.com/d/templates-revisited.html > > So, how did it go? :) It wasn't well attended because the conference people scheduled it at the same time as David Abraham's talk on templates *and* Stephen Dewhurst's template class. Anyone interested in template programming would have had a hard time picking between the three. The people who did attend, however, really enjoyed it and it was well received by them. |
March 18, 2006 Re: SDWest paper "Templates Revisited" now available | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> www.digitalmars.com/d/templates-revisited.html
"Printf Revisited".... "Templates Revisited"... Will your book on D programming be called "Programming Revisited"?
Good stuff, BTW. I may be doing your NW C++ presentation for my LUG here at University of Maryland, and follow it up with this one.
~John Demme
|
March 18, 2006 Re: SDWest paper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <dvhesn$2u2t$1@digitaldaemon.com>, Walter Bright says... > > >"Lars Ivar Igesund" <larsivar@igesund.net> wrote in message news:dvgjoj$1nd2$1@digitaldaemon.com... >> Walter Bright wrote: >> >>> www.digitalmars.com/d/templates-revisited.html >> >> So, how did it go? :) > >It wasn't well attended because the conference people scheduled it at the same time as David Abraham's talk on templates *and* Stephen Dewhurst's template class. Anyone interested in template programming would have had a hard time picking between the three. Yikes, who was the brainiac that devised that schedule?! That's a shame. Well, as they say: "there's no such thing as bad publicity". And with that, I am *very* grateful that you cited me in your paper. Thank you Walter. > >The people who did attend, however, really enjoyed it and it was well received by them. Fantastic. - EricAnderton at yahoo |
March 18, 2006 Re: SDWest paper | ||||
---|---|---|---|---|
| ||||
Posted in reply to pragma | "pragma" <pragma_member@pathlink.com> wrote in message news:dvhufj$i4c$1@digitaldaemon.com... > Well, as they say: "there's no such thing as bad publicity". And with > that, I > am *very* grateful that you cited me in your paper. Thank you Walter. You did the work, Eric. Of course you'll get the credit. |
Copyright © 1999-2021 by the D Language Foundation