Thread overview | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
November 15, 2006 Article on Tuples | ||||
---|---|---|---|---|
| ||||
http://www.digitalmars.com/d/tuple.html |
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> http://www.digitalmars.com/d/tuple.html
Seeing this:
alias Tuple!(TP, 8) TR; // TR is now float,float,3,8
alias Tuple!(TP, TP) TS; // TS is float,float,3,float,float,3
makes me really wish the syntax for typedef/alias were:
alias newname = oldname;
I always thought the ordering for C++'s typedef was goofy. I get it backwards about half the time I think, just because it's basically an assignment perversely written the other way around from all other assignments.
--bb
|
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> http://www.digitalmars.com/d/tuple.html
This does it! For the last 2 years I've been a bit uneasy about letting a metalanguage "grow" on top of D, and in the back of my head I've slowly gathered and assembled together parts needed for an ambitious metalanguage for D.
But now I give up. Gotta admit, Walter, this is becoming simply Killer Stuff! Wish I could buy you a beer for this!
Right now I feel an urge to run out on the street yelling You Aint Seen Nothin Yet!!!
I feel like a tribesman who has been carrying this heavy crate through an enormous forest with the others, gathering mushrooms and berries and game to eventually bring home. And then there's this stone wall, and after some searching we find a gate, and when we open it we are blinded by the light of the endless fields ahead, virgin and rife with fruit trees and bushes with berries.
To be the ones to have found these fields, we feel privileged, honored, and somehow even indebted! Indebted to have respect for this bounty, while still finding everything there with diligence and vigor, and putting it all to the very best uses we can think of, so that we know we can stay proud of what we've done.
Standing there, before all this, we literally feel that History is in the Making, right here and right now. And we're in it! For the first time for many of us, we know at once that this is the very time, of which we'll be telling war stories to our children and grand children, for the rest of our lives. While normally such is realized only decades later, realizing it now makes us stand taller, prouder, and with extra resolve for the hardships that inevitably will face us before we're eventually home with the crate.
|
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | On Wed, 15 Nov 2006 07:53:11 -0500, Bill Baxter <wbaxter@gmail.com> wrote:
> Seeing this:
>
> alias Tuple!(TP, 8) TR; // TR is now float,float,3,8
> alias Tuple!(TP, TP) TS; // TS is float,float,3,float,float,3
>
> makes me really wish the syntax for typedef/alias were:
>
> alias newname = oldname;
>
> I always thought the ordering for C++'s typedef was goofy. I get it backwards about half the time I think, just because it's basically an assignment perversely written the other way around from all other assignments.
>
> --bb
Think of a variable declaration and then put alias/typedef on front of it; ever since I thought of it like this I never made the mistake again.
int foo; // new foo
typedef int foo; // new foo
|
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Georg Wrede | Georg Wrede schrieb:
> Walter Bright wrote:
>
>> http://www.digitalmars.com/d/tuple.html
>
>
>
>
> Right now I feel an urge to run out on the street yelling You Aint Seen Nothin Yet!!!
>
Walter Turner Overdrive !
It is still a bit in the "fog" but the tuple/variadic parameter stuff should have some influence in implementing D collections. What do you think ?
Björn
|
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> http://www.digitalmars.com/d/tuple.html
"A tuple is a sequence of elements. Those elements can be types, expressions, or aliases."
Is this wording correct? How can you make an alias tuple?
Or does this just mean an alias of another tuple?
---
Normal C code reduces in size by ~20% when converted to D. But what happens to LOC when complex C++ template code is converted to D??? That's frightening. <g>
|
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | Don Clugston wrote:
> Normal C code reduces in size by ~20% when converted to D. But what happens to LOC when complex C++ template code is converted to D??? That's frightening. <g>
We'll have all of boost on the back of a napkin before you know it!
--bb
|
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote:
> Don Clugston wrote:
>
>> Normal C code reduces in size by ~20% when converted to D. But what happens to LOC when complex C++ template code is converted to D??? That's frightening. <g>
>
> We'll have all of boost on the back of a napkin before you know it!
What is truly amazing is that our progress now feels almost exponential! That's unheard of, logarithmic is more like what you could expect, at best.
|
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to BLS | BLS wrote:
> Georg Wrede schrieb:
>
>> Walter Bright wrote:
>>
>>> http://www.digitalmars.com/d/tuple.html
>>
>>
>>
>>
>>
>> Right now I feel an urge to run out on the street yelling You Aint Seen Nothin Yet!!!
>>
>
> Walter Turner Overdrive !
>
> It is still a bit in the "fog" but the tuple/variadic parameter stuff should have some influence in implementing D collections. What do you think ?
In the long run, I think there are few non-trivial template application areas where it wouldn't play a role.
|
November 15, 2006 Re: Article on Tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | Don Clugston wrote:
> Walter Bright wrote:
>> http://www.digitalmars.com/d/tuple.html
>
> "A tuple is a sequence of elements. Those elements can be types, expressions, or aliases."
>
> Is this wording correct? How can you make an alias tuple?
Just pass in symbols as template arguments to a U...
|
Copyright © 1999-2021 by the D Language Foundation