June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote: >> You can do that with a proxy object. > > A) How exactly? If you're going to claim it's equivalent, I think the burden is on you to show an example of it. The opDot feature allows one to wrap a type, override what you need to and forward the rest to the wrapped object. > B) Whatever you have in mind, my hunch is that it is going to be significantly more cumbersome. For example in my code I like using Vince's Vector. I like his API. But if I go with proxy objects then I think that means either I have to use the proxy object (with Larry's API) instead of Vince's Vector directly, or else every time I call Larry's code I have to wrap my Vince Vector in a Larry VectorConcept proxy wrapper. Either way it's not ideal, and more cumbersome than just writing down the mapping once in one central place. Implicit casting casts from, and constructors cast to. That should handle it. > Anyway, I think you need to find someone who understands the ins and outs of C++0x concepts and discuss with them face-to-face whether your plan for D covers all the bases sufficiently or not. It doesn't need to cover all the bases. It only has to cover the relevant useful ones. I should also point out that there are areas where D's constraint system is far more powerful (try doing isPrime() in C++). One thing to keep in mind is C++ concepts are very complicated. There's a lot of grammar, a lot of explanation, a lot of special cases to understand. None of it has proven useful in production code (that will take years). You have to stack up that high implementation cost and high learning cost for programmers up against the utility of it - just what doors does it really open? Is it a paradigm changing feature? I don't see it. On the other hand, constraints are trivial to implement, simple to understand (they build on what you already know - expressions), and arguably get the meat of what concepts do and extend it. | |||
June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | "Walter Bright" <newshound1@digitalmars.com> wrote in message news:g3n0ob$1dni$1@digitalmars.com... > That isn't the answer. What's lacking is the face-to-face. There's just nothing like sitting around a table, with coffee and a notebook, and sketching things out. My reply was meant to be tongue-in-cheek ;) Still, conversing face-to-face, while better, isn't really much of an option when 99.999% of the community doesn't live in Seattle. Sorry, you really do need to work on your textual communication skills. They're not the same, but they're still important. | |||
June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> I find it difficult to have productive discussions via email (even with Andrei). The upcoming D conference, however, will give everyone a chance for face-to-face.
Except, of course, those who can't afford plane tickets.
Just my two eurocents.
| |||
June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Bill Baxter wrote:
>>> You can do that with a proxy object.
>>
>> A) How exactly? If you're going to claim it's equivalent, I think the burden is on you to show an example of it.
>
> The opDot feature allows one to wrap a type, override what you need to and forward the rest to the wrapped object.
>
Interesting. Even operators?
| |||
June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> I wished to make the point that D constraints build on what one already knows - how to write a D expression. Concepts, on the other hand, have a major new syntax and semantic thing that must be learned. Perhaps I expressed the point badly, do you have a suggestion?
The new comparison you put in there is definitely a change for the better.
--bb
| |||
June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to downs | "downs" <default_357-line@yahoo.de> wrote in message news:g3nvt3$98d$3@digitalmars.com... > Walter Bright wrote: >> I find it difficult to have productive discussions via email (even with Andrei). The upcoming D conference, however, will give everyone a chance for face-to-face. > > Except, of course, those who can't afford plane tickets. > > Just my two eurocents. And my two American cents, since flights from the east coast to the west are still not cheap by any means.. | |||
June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to downs | downs, el 23 de junio a las 13:03 me escribiste: > Walter Bright wrote: > > I find it difficult to have productive discussions via email (even with Andrei). The upcoming D conference, however, will give everyone a chance for face-to-face. > > Except, of course, those who can't afford plane tickets. > > Just my two eurocents. Don't mention it, it's worse for people that just have argentinian pesos cents =/ -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Si ella es la flor, yo soy la espina Si ella es quien florece, yo quien se marchita Y estamos en eclipse total, y estamos en eclipse total Completamente cruzados, completamente cruzados | |||
June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to downs | downs wrote:
> Walter Bright wrote:
>> The opDot feature allows one to wrap a type, override what you need to
>> and forward the rest to the wrapped object.
>>
>
> Interesting. Even operators?
Toto too!
| |||
June 23, 2008 Re: Template constraints in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> downs wrote:
>> Walter Bright wrote:
>>> The opDot feature allows one to wrap a type, override what you need to and forward the rest to the wrapped object.
>>>
>>
>> Interesting. Even operators?
>
> Toto too!
I'm now officially in love with that feature.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply