www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Presentation at Northwest C++ Users Group

reply "Walter Bright" <newshound digitalmars.com> writes:
I'll be giving one there on the D programming language, Nov. 16. See you all
there!

Northwest C++ Users Group
www.nwcpp.org
Nov 07 2005
next sibling parent reply "Garett Bass" <garettbass studiotekne.com> writes:
I'm sorry I'll miss it.  I wish you'd gone in August while I was still in
Seattle for my internship with Amazon.  Are you based in 
the Seattle area, Walter?


"Walter Bright" <newshound digitalmars.com> wrote in message
news:dkok21$p6r$1 digitaldaemon.com...
 I'll be giving one there on the D programming language, Nov. 16. See you all
 there!

 Northwest C++ Users Group
 www.nwcpp.org

 

Nov 07 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
Yes.

"Garett Bass" <garettbass studiotekne.com> wrote in message
news:dkop3h$tvr$1 digitaldaemon.com...
 I'm sorry I'll miss it.  I wish you'd gone in August while I was still in

 the Seattle area, Walter?


 "Walter Bright" <newshound digitalmars.com> wrote in message

 I'll be giving one there on the D programming language, Nov. 16. See you


 there!

 Northwest C++ Users Group
 www.nwcpp.org


Nov 07 2005
prev sibling next sibling parent reply "Mitja Ursic" <mitja_ursic yahoo.com> writes:
Will there be slides available for download?






On Mon, 07 Nov 2005 23:21:50 +0100, Walter Bright  
<newshound digitalmars.com> wrote:

 I'll be giving one there on the D programming language, Nov. 16. See you  
 all
 there!

 Northwest C++ Users Group
 www.nwcpp.org

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Nov 08 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"Mitja Ursic" <mitja_ursic yahoo.com> wrote in message
news:op.szw1ohiy6tzao9 mitja...
 Will there be slides available for download?

I'll make it available on the website concurrently.
Nov 08 2005
prev sibling next sibling parent Georg Wrede <georg.wrede nospam.org> writes:
Walter Bright wrote:
 I'll be giving one there on the D programming language, Nov. 16. See you all
 there!

I checked the former speakers, you're definitely in the Larger Than Life category!!! Mind mentioning here when the lecture notes appear on their web page?
 Northwest C++ Users Group
 www.nwcpp.org
 
 

Nov 08 2005
prev sibling next sibling parent reply Don Clugston <dac nospam.com.au> writes:
Walter Bright wrote:
 I'll be giving one there on the D programming language, Nov. 16. See you all
 there!
 
 Northwest C++ Users Group
 www.nwcpp.org

Let me guess -- Flagship features of C++0x that are already in D ? eg, template typedefs, foreach, gc, C99 compatibility, contracts, static assert, static if, typeof, etc ... and of course 'auto'. Nah. Even if you only do one slide for each one, you'll be there all night. :-)
Nov 08 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"Don Clugston" <dac nospam.com.au> wrote in message
news:dkq9ic$29is$1 digitaldaemon.com...
 Walter Bright wrote:
 I'll be giving one there on the D programming language, Nov. 16. See you


 there!

 Northwest C++ Users Group
 www.nwcpp.org

Let me guess -- Flagship features of C++0x that are already in D ? eg, template typedefs, foreach, gc, C99 compatibility, contracts, static assert, static if, typeof, etc ... and of course 'auto'. Nah. Even if you only do one slide for each one, you'll be there all night. :-)

That's been the problem with my previous presentations, they ran on too long.
Nov 08 2005
prev sibling parent reply Dave <Dave_member pathlink.com> writes:
In article <dkok21$p6r$1 digitaldaemon.com>, Walter Bright says...
I'll be giving one there on the D programming language, Nov. 16. See you all
there!

Northwest C++ Users Group
www.nwcpp.org

How'd it go? Is there anything posted to look at? Thanks.
Nov 17 2005
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"Dave" <Dave_member pathlink.com> wrote in message
news:dliblu$1fsb$1 digitaldaemon.com...
 In article <dkok21$p6r$1 digitaldaemon.com>, Walter Bright says...
I'll be giving one there on the D programming language, Nov. 16. See you


there!

Northwest C++ Users Group
www.nwcpp.org

How'd it go?

Very well, I think.
 Is there anything posted to look at?

No, because I'm going to redo the slides <g>.
Nov 18 2005
next sibling parent Georg Wrede <georg.wrede nospam.org> writes:
Walter Bright wrote:
 "Dave" <Dave_member pathlink.com> wrote in message
 news:dliblu$1fsb$1 digitaldaemon.com...
 
In article <dkok21$p6r$1 digitaldaemon.com>, Walter Bright says...

 I'll be giving one there on the D programming language, Nov. 16.
 See you all there!

How'd it go?

Very well, I think.
Is there anything posted to look at?

No, because I'm going to redo the slides <g>.

Then we feel honoured! We're getting the edited and polished versions, while the heavy-duty gurus over there got the mere drafts.
Nov 19 2005
prev sibling parent reply Fredrik Olsson <peylow gmail.com> writes:
Walter Bright skrev:
 "Dave" <Dave_member pathlink.com> wrote in message
 news:dliblu$1fsb$1 digitaldaemon.com...
 
In article <dkok21$p6r$1 digitaldaemon.com>, Walter Bright says...

I'll be giving one there on the D programming language, Nov. 16. See you



Is there anything posted to look at?

No, because I'm going to redo the slides <g>.

Just a friendly reminder, from someone eagerly waiting :). // Fredrik
Dec 14 2005
parent reply Walter Bright <Walter_member pathlink.com> writes:
In article <dnpiau$1c19$1 digitaldaemon.com>, Fredrik Olsson says...
Walter Bright skrev:
 No, because I'm going to redo the slides <g>.
 

Just a friendly reminder, from someone eagerly waiting :).

I haven't forgotten <g>.
Dec 15 2005
parent reply Bruno Medeiros <daiphoenixNO SPAMlycos.com> writes:
Walter Bright wrote:
 In article <dnpiau$1c19$1 digitaldaemon.com>, Fredrik Olsson says...
 
Walter Bright skrev:

No, because I'm going to redo the slides <g>.

Just a friendly reminder, from someone eagerly waiting :).

I haven't forgotten <g>.

I'm wondering, what is the target(aka aproximate) time length of this presentation? -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
Dec 15 2005
parent reply Walter Bright <Walter_member pathlink.com> writes:
In article <dnsr64$q35$2 digitaldaemon.com>, Bruno Medeiros says...
I'm wondering, what is the target(aka aproximate) time length of this
presentation?

I generally shoot for an hour, with an extra half hour for questions.
Dec 15 2005
parent reply Bruno Medeiros <daiphoenixNO SPAMlycos.com> writes:
Walter Bright wrote:
 In article <dnsr64$q35$2 digitaldaemon.com>, Bruno Medeiros says...
 
I'm wondering, what is the target(aka aproximate) time length of this
presentation?

I generally shoot for an hour, with an extra half hour for questions.

(just a small audience, for a Programming Language Pragmatics course), and it's mostly written already, however, I'm having trouble finding a good example for the mixin feature. That is, a useful and pratical example, that wouldn't be solved as easily by another language feature (for instance, with class composition). Would anyone happen to have such an example? (I'd even settle with one that was not sizeable to a presentation, since I'm also plainly curious) -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
Dec 16 2005
next sibling parent reply John Demme <me teqdruid.com> writes:
Take a small c++ program that uses multiple inhertiance, and convert it.

~John Demme

Bruno Medeiros wrote:

 Walter Bright wrote:
 In article <dnsr64$q35$2 digitaldaemon.com>, Bruno Medeiros says...
 
I'm wondering, what is the target(aka aproximate) time length of this
presentation?

I generally shoot for an hour, with an extra half hour for questions.

(just a small audience, for a Programming Language Pragmatics course), and it's mostly written already, however, I'm having trouble finding a good example for the mixin feature. That is, a useful and pratical example, that wouldn't be solved as easily by another language feature (for instance, with class composition). Would anyone happen to have such an example? (I'd even settle with one that was not sizeable to a presentation, since I'm also plainly curious)

Dec 16 2005
parent Bruno Medeiros <daiphoenixNO SPAMlycos.com> writes:
John Demme wrote:
 Bruno Medeiros wrote:
Hum, I'm planning on doing a presentation on D too, in my university
(just a small audience, for a Programming Language Pragmatics course),
and it's mostly written already, however, I'm having trouble finding a
good example for the mixin feature. That is, a useful and pratical
example, that wouldn't be solved as easily by another language feature
(for instance, with class composition).
Would anyone happen to have such an example? (I'd even settle with one
that was not sizeable to a presentation, since I'm also plainly curious)

Take a small c++ program that uses multiple inhertiance, and convert it. ~John Demme

That's precisely the example I think is equally (vs. mixins) well solved with objection composition. -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
Dec 17 2005
prev sibling parent reply J C Calvarese <technocrat7 gmail.com> writes:
In article <dnv92a$2mk2$1 digitaldaemon.com>, Bruno Medeiros says...
..snip...
Hum, I'm planning on doing a presentation on D too, in my university 
(just a small audience, for a Programming Language Pragmatics course), 
and it's mostly written already, however, I'm having trouble finding a 
good example for the mixin feature. That is, a useful and pratical 
example, that wouldn't be solved as easily by another language feature 
(for instance, with class composition).
Would anyone happen to have such an example? (I'd even settle with one 
that was not sizeable to a presentation, since I'm also plainly curious)

I don't really have a good grasp of what mixins are all about, but I won't let that stop me from suggesting some links that might be helpful to you. Or not. I'll let you decide. http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample digitalmars.D/28267 digitalmars.D/29593 also of possible interest: "Mixins vs. Macros" digitalmars.D/1473 You could also browse the newsgroup looking for posts that mention mixin, but I don't know how effective that'd be since they were mentioned quite a few times before Walter even added them to D (so any of that example code would've been speculative). Mixins were added in DMD 0.89 (May 17, 2004). Here's an example of a possible search: http://www.google.com/custom?domains=www.digitalmars.com&q=mixin&sa=Search&sitesearch=www.digitalmars.com (I'll apologize in advanced if this is a double-post. The first time I clicked on "Post Message", it kept spinning its wheels and acted like it wasn't going to post.) jcc7
Dec 16 2005
parent reply Bruno Medeiros <daiphoenixNO SPAMlycos.com> writes:
J C Calvarese wrote:
 In article <dnv92a$2mk2$1 digitaldaemon.com>, Bruno Medeiros says...
 ...snip...
 
Hum, I'm planning on doing a presentation on D too, in my university 
(just a small audience, for a Programming Language Pragmatics course), 
and it's mostly written already, however, I'm having trouble finding a 
good example for the mixin feature. That is, a useful and pratical 
example, that wouldn't be solved as easily by another language feature 
(for instance, with class composition).
Would anyone happen to have such an example? (I'd even settle with one 
that was not sizeable to a presentation, since I'm also plainly curious)

I don't really have a good grasp of what mixins are all about, but I won't let that stop me from suggesting some links that might be helpful to you. Or not. I'll let you decide. http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample digitalmars.D/28267 digitalmars.D/29593 also of possible interest: "Mixins vs. Macros" digitalmars.D/1473

Yes, the other examples have some good ideias. However, as for this one here: http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample Is that not incorrect? The spec clearly states (http://www.digitalmars.com/d/template.html) that "Templates cannot be used to add non-static members" to classes. This is precisely what that example does, and the funny thing is that it compiles and runs ok. I don't see how that can work, unless the compiler is treating the templated method as final. -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
Dec 17 2005
next sibling parent reply Sean Kelly <sean f4.ca> writes:
Bruno Medeiros wrote:
 
 Yes, the other examples have some good ideias. However, as for this one 
 here:
 http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample
 Is that not incorrect?

That is incorrect. Though I think templates can not add virtual members to classes (ie. I believe template methods are implicitly final). Though I have not tested this to be sure. Sean
Dec 17 2005
parent reply "John C" <johnch_atms hotmail.com> writes:
"Sean Kelly" <sean f4.ca> wrote in message 
news:do1ig2$1ekh$1 digitaldaemon.com...
 Bruno Medeiros wrote:
 Yes, the other examples have some good ideias. However, as for this one 
 here:
 http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample
 Is that not incorrect?

That is incorrect. Though I think templates can not add virtual members to classes (ie. I believe template methods are implicitly final). Though I have not tested this to be sure. Sean

Though the spec says a mixin *can* add virtual functions to a class. That said, I recently encountered a problem whereby a class method refused to override the templated version.
Dec 17 2005
parent Sean Kelly <sean f4.ca> writes:
John C wrote:
 "Sean Kelly" <sean f4.ca> wrote in message 
 news:do1ig2$1ekh$1 digitaldaemon.com...
 Bruno Medeiros wrote:
 Yes, the other examples have some good ideias. However, as for this one 
 here:
 http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample
 Is that not incorrect?

to classes (ie. I believe template methods are implicitly final). Though I have not tested this to be sure. Sean

Though the spec says a mixin *can* add virtual functions to a class. That said, I recently encountered a problem whereby a class method refused to override the templated version.

I think this might work: class C { template fn(T) { void fn( T val ) {} } alias fn!(char) charFn; } class D : C { override void charFn() {} } Sean
Dec 17 2005
prev sibling parent reply Dave <Dave_member pathlink.com> writes:
In article <do113n$135m$1 digitaldaemon.com>, Bruno Medeiros says...
Yes, the other examples have some good ideias. However, as for this one 
here:
http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample
Is that not incorrect? The spec clearly states 
(http://www.digitalmars.com/d/template.html) that "Templates cannot be 
used to add non-static members" to classes. This is precisely what that 
example does, and the funny thing is that it compiles and runs ok. I 
don't see how that can work, unless the compiler is treating the 
templated method as final.

I expanded that example a bit to use inheritance and it looks like the documentation is wrong... Not only are the functions non-static and non-final but are (correctly) virtual as well. Walter? - Dave
-- 
Bruno Medeiros - CS/E student
"Certain aspects of D are a pathway to many abilities some consider to 
be... unnatural."

Dec 17 2005
parent reply Bruno Medeiros <daiphoenixNO SPAMlycos.com> writes:
Dave wrote:
 In article <do113n$135m$1 digitaldaemon.com>, Bruno Medeiros says...
 
Yes, the other examples have some good ideias. However, as for this one 
here:
http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample
Is that not incorrect? The spec clearly states 
(http://www.digitalmars.com/d/template.html) that "Templates cannot be 
used to add non-static members" to classes. This is precisely what that 
example does, and the funny thing is that it compiles and runs ok. I 
don't see how that can work, unless the compiler is treating the 
templated method as final.

I expanded that example a bit to use inheritance and it looks like the documentation is wrong... Not only are the functions non-static and non-final but are (correctly) virtual as well. Walter? - Dave

First of all, the existance of the inner template declaration and/or inner template instances does not change the size of the class vtable. Second, this test: class FooA { template as() { void func() { writefln("FooA func()"); } } } class FooB : FooA { template as() { void func() { writefln("FooB func()"); } } } int main(char[][] args) { // writefln(FooA.classinfo.vtbl.length); FooA foob = new FooB(); foob.as!().func(); // calls FooA.as!().func() } shows that the templated function is not virtual. It's not possible otherwise. So it's a compiler bug (should give an error unless templated function(s) are declared as final). -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
Dec 19 2005
parent reply Dave <Dave_member pathlink.com> writes:
In article <do6af9$2nd$1 digitaldaemon.com>, Bruno Medeiros says...
Dave wrote:
 In article <do113n$135m$1 digitaldaemon.com>, Bruno Medeiros says...
 
Yes, the other examples have some good ideias. However, as for this one 
here:
http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample
Is that not incorrect? The spec clearly states 
(http://www.digitalmars.com/d/template.html) that "Templates cannot be 
used to add non-static members" to classes. This is precisely what that 
example does, and the funny thing is that it compiles and runs ok. I 
don't see how that can work, unless the compiler is treating the 
templated method as final.

I expanded that example a bit to use inheritance and it looks like the documentation is wrong... Not only are the functions non-static and non-final but are (correctly) virtual as well. Walter? - Dave

First of all, the existance of the inner template declaration and/or inner template instances does not change the size of the class vtable. Second, this test: class FooA { template as() { void func() { writefln("FooA func()"); } } } class FooB : FooA { template as() { void func() { writefln("FooB func()"); } } } int main(char[][] args) { // writefln(FooA.classinfo.vtbl.length); FooA foob = new FooB(); foob.as!().func(); // calls FooA.as!().func() } shows that the templated function is not virtual. It's not possible otherwise. So it's a compiler bug (should give an error unless templated function(s) are declared as final).

You're right about the virtual - I misinterpreted my results. Declaring them final isn't correct though, because the compiler can't enforce that for the same reason it isn't making them virtual in the first place. In other words, if it could enforce final by checking for overridden functions, then why not make them virtual as well? So it looks like the docs. are correct as-is, *but* the compiler has to change to enforce the use of 'static' for this case.
Dec 19 2005
parent Bruno Medeiros <daiphoenixNO SPAMlycos.com> writes:
Dave wrote:
 In article <do6af9$2nd$1 digitaldaemon.com>, Bruno Medeiros says...
 
Dave wrote:

In article <do113n$135m$1 digitaldaemon.com>, Bruno Medeiros says...


Yes, the other examples have some good ideias. However, as for this one 
here:
http://trac.dsource.org/projects/tutorials/wiki/InternalTemplatesExample
Is that not incorrect? The spec clearly states 
(http://www.digitalmars.com/d/template.html) that "Templates cannot be 
used to add non-static members" to classes. This is precisely what that 
example does, and the funny thing is that it compiles and runs ok. I 
don't see how that can work, unless the compiler is treating the 
templated method as final.

I expanded that example a bit to use inheritance and it looks like the documentation is wrong... Not only are the functions non-static and non-final but are (correctly) virtual as well. Walter? - Dave

How did you test that? Because it's not correct, they are not virtual. First of all, the existance of the inner template declaration and/or inner template instances does not change the size of the class vtable. Second, this test: class FooA { template as() { void func() { writefln("FooA func()"); } } } class FooB : FooA { template as() { void func() { writefln("FooB func()"); } } } int main(char[][] args) { // writefln(FooA.classinfo.vtbl.length); FooA foob = new FooB(); foob.as!().func(); // calls FooA.as!().func() } shows that the templated function is not virtual. It's not possible otherwise. So it's a compiler bug (should give an error unless templated function(s) are declared as final).

You're right about the virtual - I misinterpreted my results. Declaring them final isn't correct though, because the compiler can't enforce that for the same reason it isn't making them virtual in the first place. In other words, if it could enforce final by checking for overridden functions, then why not make them virtual as well?

(This is the only way to create such "rogue" functions, AFAIK.)
 So it looks like the docs. are correct as-is, *but* the compiler has to change
 to enforce the use of 'static' for this case.
 

-- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
Dec 20 2005