On 10/16/2010 1:19 PM, Andrei Alexandrescu wrote:
> The problem with "adaptTo" is that, just like itoa or printf, it is too
> boring to have marketing value. I think the feature is going to be
> _big_. We can't leave a big feature to a name like "adaptTo". The New
> York Times won't have a headline
On 10/19/10 17:50 CDT, Roman Ivanov wrote:
On 10/16/2010 1:19 PM, Andrei Alexandrescu wrote:
The problem with "adaptTo" is that, just like itoa or printf, it is too
boring to have marketing value. I think the feature is going to be
_big_. We can't leave a big feature to a name like "adaptTo". Th
Andrei Alexandrescu wrote:
I think it's best to concede and call the artifact "adapt".
Aww. I liked duck.
--
Simen
On 10/19/2010 7:01 PM, Andrei Alexandrescu wrote:
> On 10/19/10 17:50 CDT, Roman Ivanov wrote:
>> Hm, how about this?
>>
>> auto d = make!Drawable(obj);
>>
>> Reads "make Drawable from obj".
>
> "make" has factory conotations. I think it's best to concede and call
> the artifact "adapt".
>
> Andr
On 16/10/2010 21:30, Michel Fortin wrote:
On 2010-10-16 16:05:52 -0400, Andrei Alexandrescu
said:
On 10/16/2010 02:54 PM, kenji hara wrote:
Adapter-Pattern! I'd have forgotten the name.
It is NOT equals to duck-typing.
It's a subset of duck typing. I don't think calling a function that
supp
On 16/10/2010 19:16, Walter Bright wrote:
Being the upstart language, D needs now and then something a little more
attention-getting than generic terms. The "duck" feature is important
for two reasons:
1. duck typing is all the rage now
What??... :o
I think this is very much a wrong percepti
On 17/10/2010 20:11, Andrei Alexandrescu wrote:
On 10/17/2010 01:09 PM, Jeff Nowakowski wrote:
On 10/16/2010 04:05 PM, Andrei Alexandrescu wrote:
It's a subset of duck typing. I don't think calling a function that
supports a limited form of duck typing "duck" is a lie.
I'm sure if it was on
On 11/11/10 6:30 AM, Bruno Medeiros wrote:
On 17/10/2010 20:11, Andrei Alexandrescu wrote:
On 10/17/2010 01:09 PM, Jeff Nowakowski wrote:
On 10/16/2010 04:05 PM, Andrei Alexandrescu wrote:
It's a subset of duck typing. I don't think calling a function that
supports a limited form of duck typi
On 11/11/2010 14:19, Bruno Medeiros wrote:
way in the future. I think dynamic languages are somewhat of a niche
(even if a growing one), but not really heading to be mainstream in
medium/large scale projects.
Sorry, I actually meant "I think dynamic _typing_ is somewhat of a
niche" rather than
On Thu, Nov 11, 2010 at 10:01 AM, Bruno Medeiros
wrote:
> On 11/11/2010 14:19, Bruno Medeiros wrote:
>
>> way in the future. I think dynamic languages are somewhat of a niche
>> (even if a growing one), but not really heading to be mainstream in
>> medium/large scale projects.
>>
>
> Sorry, I act
On Thu, Nov 11, 2010 at 11:25 AM, Andrew Wiley wrote:
> On Thu, Nov 11, 2010 at 10:01 AM, Bruno Medeiros
> wrote:
>
>> On 11/11/2010 14:19, Bruno Medeiros wrote:
>>
>>> way in the future. I think dynamic languages are somewhat of a niche
>>> (even if a growing one), but not really heading to be
On 11/11/2010 15:22, Andrei Alexandrescu wrote:
On 11/11/10 6:30 AM, Bruno Medeiros wrote:
On 17/10/2010 20:11, Andrei Alexandrescu wrote:
On 10/17/2010 01:09 PM, Jeff Nowakowski wrote:
On 10/16/2010 04:05 PM, Andrei Alexandrescu wrote:
It's a subset of duck typing. I don't think calling a f
"Andrei Alexandrescu" wrote in message
news:i9ae2n$k9...@digitalmars.com...
>I was talking to Walter about Kenji's adaptTo. We both think it's a very
>powerful enabler, but adaptTo is a bland name. After discussing a few
>marketing strategies, I proposed "duck". It's short, simple, and evokes
On 10/15/10 15:46 CDT, Nick Sabalausky wrote:
"Andrei Alexandrescu" wrote in message
news:i9ae2n$k9...@digitalmars.com...
I was talking to Walter about Kenji's adaptTo. We both think it's a very
powerful enabler, but adaptTo is a bland name. After discussing a few
marketing strategies, I propos
So what exactly does adaptTO/duck! do? For those not in the know-how..? :)
On 10/15/10, Andrei Alexandrescu wrote:
> On 10/15/10 15:46 CDT, Nick Sabalausky wrote:
>> "Andrei Alexandrescu" wrote in message
>> news:i9ae2n$k9...@digitalmars.com...
>>> I was talking to Walter about Kenji's adaptTo.
Andrei Alexandrescu Wrote:
> I was talking to Walter about Kenji's adaptTo. We both think it's a very
> powerful enabler, but adaptTo is a bland name. After discussing a few
> marketing strategies, I proposed "duck". It's short, simple, and evokes
> "duck typing".
1. adaptTo helped me to under
"Andrei Alexandrescu" wrote in message
news:i9ae2n$k9...@digitalmars.com...
>I was talking to Walter about Kenji's adaptTo. We both think it's a very
>powerful enabler, but adaptTo is a bland name. After discussing a few
>marketing strategies, I proposed "duck". It's short, simple, and evokes
It doesn't matter if it sounds unintuitive to you right now,
eventually if you keep using it, the word will stick.
duck! is a nice name, so I'm fine with the idea.
On Fri, Oct 15, 2010 at 4:46 PM, JimBob wrote:
>
> "Andrei Alexandrescu" wrote in message
> news:i9ae2n$k9...@digitalmars.com...
>
I'd get used to Jimmy!, and thats a nice name too.
"Jimmy Cao" wrote in message
news:mailman.635.1287179560.858.digitalmar...@puremagic.com...
It doesn't matter if it sounds unintuitive to you right now,
eventually if you keep using it, the word will stick.
duck! is a nice name, so I'm
On 10/15/10 16:16 CDT, Kagamin wrote:
Andrei Alexandrescu Wrote:
I was talking to Walter about Kenji's adaptTo. We both think it's a very
powerful enabler, but adaptTo is a bland name. After discussing a few
marketing strategies, I proposed "duck". It's short, simple, and evokes
"duck typing".
On 16/10/2010 9:33 AM, Andrei Alexandrescu wrote:
On 10/15/10 16:16 CDT, Kagamin wrote:
Andrei Alexandrescu Wrote:
I was talking to Walter about Kenji's adaptTo. We both think it's a very
powerful enabler, but adaptTo is a bland name. After discussing a few
marketing strategies, I proposed "du
Kagamin, el 15 de octubre a las 17:16 me escribiste:
> Andrei Alexandrescu Wrote:
>
> > I was talking to Walter about Kenji's adaptTo. We both think it's a very
> > powerful enabler, but adaptTo is a bland name. After discussing a few
> > marketing strategies, I proposed "duck". It's short, simp
On Friday 15 October 2010 23:35:35 Leandro Lucarella wrote:
> Kagamin, el 15 de octubre a las 17:16 me escribiste:
> > Andrei Alexandrescu Wrote:
> > > I was talking to Walter about Kenji's adaptTo. We both think it's a
> > > very powerful enabler, but adaptTo is a bland name. After discussing a
>
> auto d = duck!Drawable(c); // awes
What about "as" ?
auto d = as!Drawable(c);
Christof
On 16/10/2010 6:30 PM, Christof Schardt wrote:
auto d = duck!Drawable(c); // awes
What about "as" ?
auto d = as!Drawable(c);
Christof
This is a totally brilliant suggestion by Christof as
anyone who understands the XPath 2.0 type language
would tell you also.
While finding duck! rather cut
On 2010-10-16 03:30:27 -0400, "Christof Schardt" said:
auto d = duck!Drawable(c); // awes
What about "as" ?
auto d = as!Drawable(c);
I like "as" much more than "duck". It's a good fit with "to".
--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/
On 10/16/2010 10:30 AM, Christof Schardt wrote:
auto d = duck!Drawable(c); // awes
What about "as" ?
auto d = as!Drawable(c);
Christof
Nice name. It can be confused with the dynamic cast operator by some C#
users but that is probably a non-issue.
On 16/10/2010 11:03 PM, Michel Fortin wrote:
On 2010-10-16 03:30:27 -0400, "Christof Schardt"
said:
auto d = duck!Drawable(c); // awes
What about "as"
auto d = as!Drawable(c);
I like "as" much more than "duck". It's a good fit with "to".
It all comes down to some type of morphism, say,
On 2010-10-16 08:41:26 -0400, Justin Johansson said:
In short "as!" eats the lunch of "to!" in the "duck typing" metaphor.
Yeah, I do agree, and I didn't mean I'd prefer "to" instead of "as".
All I said (or I meant to say) is that they look good as a pair, "as"
is in a way a continuity from
Justin Johansson wrote:
> On 16/10/2010 6:30 PM, Christof Schardt wrote:
>>> auto d = duck!Drawable(c); // awes
>>
>> What about "as" ?
>>
>> auto d = as!Drawable(c);
>>
>> Christof
>
> This is a totally brilliant suggestion by Christof as
> anyone who understands the XPath 2.0 type language
> wo
On 10/16/10 1:35 CDT, Leandro Lucarella wrote:
Kagamin, el 15 de octubre a las 17:16 me escribiste:
Andrei Alexandrescu Wrote:
I was talking to Walter about Kenji's adaptTo. We both think it's a very
powerful enabler, but adaptTo is a bland name. After discussing a few
marketing strategies, I
On 10/16/10 2:21 CDT, Jonathan M Davis wrote:
On Friday 15 October 2010 23:35:35 Leandro Lucarella wrote:
Kagamin, el 15 de octubre a las 17:16 me escribiste:
Andrei Alexandrescu Wrote:
I was talking to Walter about Kenji's adaptTo. We both think it's a
very powerful enabler, but adaptTo is a
On 10/16/10 2:30 CDT, Christof Schardt wrote:
auto d = duck!Drawable(c); // awes
What about "as" ?
auto d = as!Drawable(c);
Nice too, and evokes "to". "to" was a success in spite of the fact that
it's difficult to talk about (e.g. "Could you use 'to'?" "To what?"
etc). I still prefer "duck
On 10/16/10 12:30 AM, Christof Schardt wrote:
auto d = duck!Drawable(c); // awes
What about "as" ?
auto d = as!Drawable(c);
Christof
Forgive my ignorance, but with uniform function syntax, could this be
rewritten as:
auto d = c.as!Drawable;
or will uniform function syntax not work with
On Sat, 2010-10-16 at 15:25 +0300, Max Samukha wrote:
> On 10/16/2010 10:30 AM, Christof Schardt wrote:
> >> auto d = duck!Drawable(c); // awes
> >
> > What about "as" ?
> >
> > auto d = as!Drawable(c);
> >
> > Christof
> >
> >
>
> Nice name. It can be confused with the dynamic cast operator by so
On Sat, Oct 16, 2010 at 9:01 AM, Andrei Alexandrescu <
seewebsiteforem...@erdani.org> wrote:
> On 10/16/10 2:30 CDT, Christof Schardt wrote:
>
>> auto d = duck!Drawable(c); // awes
>>>
>>
>> What about "as" ?
>>
>> auto d = as!Drawable(c);
>>
>
> Nice too, and evokes "to". "to" was a success in sp
On 2010-10-16 09:54:50 -0400, Andrei Alexandrescu
said:
Walter recognized it instantly, as I think most should. Isn't "duck
typing" really spread out there?
"duck" is a misnomer.
First, it's dubious whether this "duck" function implements what most
people understand by "duck typing".
Wik
On Sat, 16 Oct 2010 09:30:27 +0200, "Christof Schardt"
wrote:
auto d = as!Drawable(c);
My turn:
auto d = implements!Drawable(c);
On Sat, 16 Oct 2010 03:30:27 -0400, Christof Schardt
wrote:
auto d = duck!Drawable(c); // awes
What about "as" ?
auto d = as!Drawable(c);
Christof
I like as better than duck.
-Steve
I feel "as" and "to" are too similar, they could both be interpreted
as simple casting for example.
Andrei Alexandrescu, el 16 de octubre a las 08:54 me escribiste:
> On 10/16/10 1:35 CDT, Leandro Lucarella wrote:
> >Kagamin, el 15 de octubre a las 17:16 me escribiste:
> >>Andrei Alexandrescu Wrote:
> >>
> >>>I was talking to Walter about Kenji's adaptTo. We both think it's a very
> >>>powerful e
On 16/10/10 4:24 PM, Juanjo Alvarez wrote:
On Sat, 16 Oct 2010 09:30:27 +0200, "Christof Schardt"
wrote:
auto d = as!Drawable(c);
My turn:
auto d = implements!Drawable(c);
That doesn't really work. If I saw that, I would assume that
"implements" returns a boolean true when c implements th
On Sat, 16 Oct 2010 00:37:10 +0400, Andrei Alexandrescu
wrote:
I was talking to Walter about Kenji's adaptTo. We both think it's a very
powerful enabler, but adaptTo is a bland name. After discussing a few
marketing strategies, I proposed "duck". It's short, simple, and evokes
"duck typi
I'm not a native English speaker, so you are well about naming than I.
But, by two reasons, I think 'duck' isn't good.
1.
'Duck Typing' is phenomenon, not doing.
- auto d = adaptTo!Drawable(c)
- auto d = duck!Drawable(c)
Which is more explainable that this statement does?
I think adaptTo is more
Kagamin wrote:
> Andrei Alexandrescu Wrote:
>
>> I was talking to Walter about Kenji's adaptTo. We both think it's a very
>> powerful enabler, but adaptTo is a bland name. After discussing a few
>> marketing strategies, I proposed "duck". It's short, simple, and evokes
>> "duck typing".
>
> 1.
kenji hara wrote:
I'm now implementing function getting original object from
interface(like Drawable).
auto c = new C();
auto d = adaptTo!Drawable(c);
...
auto c2 = = XXX!C(d)
assert(c2 is c);
In this case, XXX's name may be antonym of adaptTo.
What is the antonym of 'duck'?
goose?
On 10/16/2010 11:35 AM, kenji hara wrote:
I'm not a native English speaker, so you are well about naming than I.
But, by two reasons, I think 'duck' isn't good.
1.
'Duck Typing' is phenomenon, not doing.
- auto d = adaptTo!Drawable(c)
- auto d = duck!Drawable(c)
Which is more explainable that t
On Sat, 16 Oct 2010 13:19:36 -0400, Andrei Alexandrescu
wrote:
The problem with "adaptTo" is that, just like itoa or printf, it is too
boring to have marketing value.
Wait, really? This statement has no place in a programming language
decision IMO. Nobody is going to start using D beca
Leandro Lucarella wrote:
Walter and you have the same convoluted brain, I can understand why he
instantly recognize it ;)
I already made my point, it make no sense to keep defending my position
since, evidently, is a pure subjective matter.
It certainly is a glorious bikeshed.
I just thi
Russel Winder wrote:
Groovy uses [...]
!!!
Steven Schveighoffer wrote:
On Sat, 16 Oct 2010 13:19:36 -0400, Andrei Alexandrescu
wrote:
The problem with "adaptTo" is that, just like itoa or printf, it is
too boring to have marketing value.
Wait, really? This statement has no place in a programming language
decision IMO.
One would
On 2010-10-16 13:19:36 -0400, Andrei Alexandrescu
said:
The problem with "adaptTo" is that, just like itoa or printf, it is too
boring to have marketing value. I think the feature is going to be
_big_. We can't leave a big feature to a name like "adaptTo". The New
York Times won't have a hea
On 2010-10-16 14:32:10 -0400, Walter Bright said:
Nobody is going to start using D because it has a function *named* duck.
Maybe not, but it will raise awareness that "D has duck typing".
Otherwise, I guarantee you that people will argue that "I need duck
typing, and Z has it and D does not
On 10/16/2010 09:16 PM, Walter Bright wrote:
Leandro Lucarella wrote:
Walter and you have the same convoluted brain, I can understand why he
instantly recognize it ;)
I already made my point, it make no sense to keep defending my position
since, evidently, is a pure subjective matter.
It
As "as" looks sweet, you have rather compelling points, "duck" sure grabs
too much attention.
On Sat, 16 Oct 2010 21:16:08 +0300, Walter Bright
wrote:
Leandro Lucarella wrote:
Walter and you have the same convoluted brain, I can understand why he
instantly recognize it ;)
I already
Michel Fortin wrote:
On 2010-10-16 14:32:10 -0400, Walter Bright
said:
Nobody is going to start using D because it has a function *named* duck.
Maybe not, but it will raise awareness that "D has duck typing".
Otherwise, I guarantee you that people will argue that "I need duck
typing, and
Walter Bright Wrote:
> One would think programmers are above all that, but we are not.
Ask people what they think about "cross-platform" .net ad campaign.
On Sat, 16 Oct 2010 14:32:10 -0400, Walter Bright
wrote:
Steven Schveighoffer wrote:
On Sat, 16 Oct 2010 13:19:36 -0400, Andrei Alexandrescu
wrote:
The problem with "adaptTo" is that, just like itoa or printf, it is
too boring to have marketing value.
Wait, really? This statement has
Reading wikipedia, definition and the examples exactly match adaptTo.
Before naming it, i think we should first be clear about if it is really
duck-typing or not.
On Sat, 16 Oct 2010 21:44:51 +0300, Michel Fortin
wrote:
On 2010-10-16 14:32:10 -0400, Walter Bright
said:
Nobody is goi
Walter Bright Wrote:
> Which blog article would you click on? "Interface Adapter for D" or "Duck
> Typing
> for D"?
>
You are somewhat right. The right place for marketing is an article, not the
library source, right? What would you click on? "Duck typing for D" or
dsource.org/phobos/src/trun
Michel Fortin Wrote:
> The problem is that D doesn't have duck-typing. The adapter pattern
> isn't duck-typing. Duck-typing is when you have an object and can call
> a 'quack' function on it and if there's no 'quack' function you get a
> runtime error.
Isn't that dynamic typing?
I think it's safe to say this is pretty much duck-typing in D (?)
So then, if duck! is used, it puts emphasis on what the function allows D to
do (duck-typing),
while if as! is used, it sounds more intuitive (kinda like ".respond_to?" in
Ruby) .
So going with my previous statement,
if you keep usi
What's all this arguing about anyway?
import std.conv : duck;
alias duck as;
alias duck adaptTo;
Done deal.
On 10/16/10, Jimmy Cao wrote:
> I think it's safe to say this is pretty much duck-typing in D (?)
> So then, if duck! is used, it puts emphasis on what the function allows D to
> do (duc
According to wikipedia,
duck typing is a style of dynamic typing where an object's
methods/properties determine what i can do.
On Sat, Oct 16, 2010 at 2:14 PM, Kagamin wrote:
> Michel Fortin Wrote:
>
> > The problem is that D doesn't have duck-typing. The adapter pattern
> > isn't duck-typing. D
On 10/16/2010 12:38 PM, Steven Schveighoffer wrote:
On Sat, 16 Oct 2010 13:19:36 -0400, Andrei Alexandrescu
wrote:
The problem with "adaptTo" is that, just like itoa or printf, it is
too boring to have marketing value.
Wait, really? This statement has no place in a programming language
decis
> The problem is that D doesn't have duck-typing.
But it does and it has for a long time:
void func(A)(A a) {
a.quack();
}
This new thing looks to me to be more like Go typing (lol?), where objects
fulfill
interfaces without explicit templates on the functions nor decorations on the
class. H
Haha!
But many people consider the interface system in Go as duck-typing,
so imo duck! is a very suitable name.
On Sat, Oct 16, 2010 at 2:25 PM, Adam D. Ruppe wrote:
> > The problem is that D doesn't have duck-typing.
>
> But it does and it has for a long time:
>
> void func(A)(A a) {
> a.quack
'Duck Typing' is a very broad concept.
adaptTo is supported only in part.
For example, you can not adapt class from class.
It has semantic problem of object states, so I never support it.
// this is invalid example
class C{ draw(){ return 10; } }
class X{ draw(){ return value; } int value; }
Adapter-Pattern! I'd have forgotten the name.
It is NOT equals to duck-typing.
adaptTo supports Adapter-Pattern.
Thanks Michel.
Kenji Hara
2010/10/17 Michel Fortin :
> On 2010-10-16 14:32:10 -0400, Walter Bright
> said:
>
>>> Nobody is going to start using D because it has a function *named* d
On 10/16/2010 01:43 PM, Michel Fortin wrote:
On 2010-10-16 13:19:36 -0400, Andrei Alexandrescu
said:
The problem with "adaptTo" is that, just like itoa or printf, it is
too boring to have marketing value. I think the feature is going to be
_big_. We can't leave a big feature to a name like "ad
Max Samukha wrote:
I think that is a wrong approach to marketing. Even microsoft avoids
giving fancy names to API functions. It is ok to give a fancy name to an
API (Windows Presentation Foundation, etc) or a product but the mundane
function names should be as boring and factual as they deserve
Andrei Alexandrescu wrote:
Please substitute: "X does duck typing in the D programming language".
What is X?
FWIW this was the story with "immutable". Walter got tired of
explaining: "Invariant implements immutable types in the D programming
language".
Boy did I ever get tired of that. It's
On 10/16/2010 02:54 PM, kenji hara wrote:
Adapter-Pattern! I'd have forgotten the name.
It is NOT equals to duck-typing.
It's a subset of duck typing. I don't think calling a function that
supports a limited form of duck typing "duck" is a lie.
Andrei
Wouldn't linking adaptTo to opDispatch (if the functions we are after not
supported by that class) make it complete duck-typing?
On Sat, 16 Oct 2010 23:05:52 +0300, Andrei Alexandrescu
wrote:
On 10/16/2010 02:54 PM, kenji hara wrote:
Adapter-Pattern! I'd have forgotten the name.
It is NO
Steven Schveighoffer wrote:
Think of it another way. Remember zip files? What a great name, and
yes, it seemed silly at first, but zip entered the lexicon and D has a
zip module and it never occurs to anyone it might be better named
std.compressedArchive. Phil Katz renamed arc files "zip" files
On 2010-10-16 16:05:52 -0400, Andrei Alexandrescu
said:
On 10/16/2010 02:54 PM, kenji hara wrote:
Adapter-Pattern! I'd have forgotten the name.
It is NOT equals to duck-typing.
It's a subset of duck typing. I don't think calling a function that
supports a limited form of duck typing "duck"
Kagamin wrote:
Walter Bright Wrote:
Which blog article would you click on? "Interface Adapter for D" or "Duck
Typing for D"?
You are somewhat right. The right place for marketing is an article, not the
library source, right?
They're both important. Especially consider that Phobos is open so
Lutger wrote:
Justin Johansson wrote:
On 16/10/2010 6:30 PM, Christof Schardt wrote:
auto d = duck!Drawable(c); // awes
What about "as" ?
auto d = as!Drawable(c);
Christof
This is a totally brilliant suggestion by Christof as
anyone who understands the XPath 2.0 type language
would tell yo
Kagamin wrote:
Walter Bright Wrote:
One would think programmers are above all that, but we are not.
Ask people what they think about "cross-platform" .net ad campaign.
I don't know anything about that.
Yes, it certainly is not a lie.
In Naming Type System, adaptTo extends duck.
But, people who you want to appeal it will think that all of
duck-typings each person imagine possible.
As a result, by knowing duck supports only Adapter-Pattern, they will
be lied to and angry.
It will negatively affect
I'm going to go with duck on this one. It could be an attractive name
to put in reddit/yc titles.. "Can your language duck? D can, with
duck!". Plus it's easily greppable and easy to type. And I don't like
stuttering words like adaptTo, there's two repeating t's in there
*and* I need a shift, that
On 10/16/2010 14:02, Walter Bright wrote:
> If it's a cringeworthy name, I'd agree. But "duck" is not cringeworthy.
Fact: I cringe every time I hear "duck typing".
--
Rainer Deyke - rain...@eldwood.com
On Sat, 16 Oct 2010 16:26:15 -0400, Walter Bright
wrote:
Steven Schveighoffer wrote:
Think of it another way. Remember zip files? What a great name, and
yes, it seemed silly at first, but zip entered the lexicon and D has a
zip module and it never occurs to anyone it might be better named
On Sat, 16 Oct 2010 16:31:34 -0400, Walter Bright
wrote:
If I google for "adapt for D" I'll get a hopeless mess of irrelevant
links. "duck typing for D" should be much better. Remember that google
ranks pages by relevance, and searching for "duck" will give higher
ranking for pages with
On 10/16/2010 03:26 PM, Walter Bright wrote:
It's an example of a phenomenon I've seen over and over. How about the
names Google and Yahoo? Boy did I think they were stupid names for
companies and products. Boy was I wrong. How about the perjorative name
"twitter" and the hopelessly undignified v
On 10/16/2010 03:30 PM, Michel Fortin wrote:
On 2010-10-16 16:05:52 -0400, Andrei Alexandrescu
said:
On 10/16/2010 02:54 PM, kenji hara wrote:
Adapter-Pattern! I'd have forgotten the name.
It is NOT equals to duck-typing.
It's a subset of duck typing. I don't think calling a function that
s
On 10/16/2010 03:43 PM, kenji hara wrote:
Yes, it certainly is not a lie.
In Naming Type System, adaptTo extends duck.
But, people who you want to appeal it will think that all of
duck-typings each person imagine possible.
As a result, by knowing duck supports only Adapter-Pattern, they will
be
On 10/16/2010 03:58 PM, Rainer Deyke wrote:
On 10/16/2010 14:02, Walter Bright wrote:
If it's a cringeworthy name, I'd agree. But "duck" is not cringeworthy.
Fact: I cringe every time I hear "duck typing".
Me too, for a long time. Then I had to get used to it because most
everybody was usin
totally agreeed. let advertisability to influence a function name is
ridiculous to me. you gotta have some princeple for names, but
advertisability? i dont think so.
On Sunday, October 17, 2010, Steven Schveighoffer wrote:
> On Sat, 16 Oct 2010 16:26:15 -0400, Walter Bright
> wrote:
>
>
> Steve
On 10/16/2010 04:00 PM, Steven Schveighoffer wrote:
But naming the function that does duck
typing 'duck' doesn't seem to me like it makes or breaks D at all.
You do find it important, otherwise you wouldn't have spent cumulative
hours arguing about it.
Andrei
On 10/16/2010 04:52 PM, Michael Chen wrote:
totally agreeed. let advertisability to influence a function name is
ridiculous to me. you gotta have some princeple for names, but
advertisability? i dont think so.
It is a function, but it implements an entire feature - like e.g.
"cast". What if D
Steven Schveighoffer wrote:
On Sat, 16 Oct 2010 16:31:34 -0400, Walter Bright
wrote:
If I google for "adapt for D" I'll get a hopeless mess of irrelevant
links. "duck typing for D" should be much better. Remember that google
ranks pages by relevance, and searching for "duck" will give higher
The very important principle here for the naming is making it obvious that D
supports an element of duck-typing.
Naming it duck! does just that.
Advertisability is not what I would use to describe it. How about clarity,
articulateness, and lucidity?
On Sat, Oct 16, 2010 at 4:52 PM, Michael Chen
Andrei Alexandrescu wrote:
On 10/16/2010 03:26 PM, Walter Bright wrote:
A lot of people do think duck typing is very important.
It's the defining feature of Go.
That makes me curious about the etymology of duckduckgo.com !
On 2010-10-16 17:45:56 -0400, Andrei Alexandrescu
said:
unittest
{
auto x = new Drawable;
auto a = nameone!Widget(x); // works
//auto b = nameone!ColoredWidget(x); // doesn't compile
auto c = nametwo!ColoredWidget(x);
c.draw(); // works
c.setColor(red); // throws
Steven Schveighoffer wrote:
I'm just saying that marketability of D does
not change no matter what appropriate term you choose.
And this is our fundamental disagreement. I think the choices of names matters a
lot.
If names don't matter, why not name your son "Sue" ? :-)
But were there funct
On Saturday 16 October 2010 15:06:21 Walter Bright wrote:
> Andrei Alexandrescu wrote:
> > On 10/16/2010 03:26 PM, Walter Bright wrote:
> >> A lot of people do think duck typing is very important.
> >
> > It's the defining feature of Go.
>
> That makes me curious about the etymology of duckduckgo
Current dmd does not enough support runtime reflection.
// test code
class A
{
int quack() { return 10; }
}
void main()
{
Object o = new A();
TypeInfo ti;
ti = typeid(o);
if( auto ti_c = cast(TypeInfo_Class)ti ){
auto members = ti_c.getMembers("quack");
Walter Bright, el 16 de octubre a las 11:16 me escribiste:
> Label it "adaptTo" and few will even notice it. Label it "duck" and
> people will click on the link to see what it does. It's important
> that people notice that D has these things, and "duck" helps with
> that.
Well, maybe I'm not peopl
On 10/16/2010 05:57 PM, kenji hara wrote:
Current dmd does not enough support runtime reflection.
[snip]
I think runtime reflection is not needed. What you'd need to do for the
"loose duck" is generate code that throws for all interface methods that
are not present in the class. Am I wrong?
1 - 100 of 127 matches
Mail list logo