Re: A new blog article detailing the alternative function syntax

2013-08-09 Thread Gary Willoughby
On Thursday, 8 August 2013 at 22:37:04 UTC, Andrei Alexandrescu 
wrote:
If you want me to post to reddit tomorrow morning, let me know. 
My good post karma is likely to push the post into visibility 
quickly. On the other hand, if you post it yourself it will 
improve _your_ karma. Tradeoffs, tradeoffs...


Sure go ahead.


Re: A new blog article detailing the alternative function syntax

2013-08-09 Thread monarch_dodra

On Friday, 9 August 2013 at 08:03:45 UTC, Gary Willoughby wrote:
On Thursday, 8 August 2013 at 22:37:04 UTC, Andrei Alexandrescu 
wrote:
If you want me to post to reddit tomorrow morning, let me 
know. My good post karma is likely to push the post into 
visibility quickly. On the other hand, if you post it yourself 
it will improve _your_ karma. Tradeoffs, tradeoffs...


Sure go ahead.


Good read. I think I already knew all of it, but seeing it all 
written in a concise and organized way is always a good 
refresher, and also reminds you of the why things are the way 
they are.


Re: A new blog article detailing the alternative function syntax

2013-08-09 Thread Rory McGuire
Quick question: does UFCS allow you to make a type implement an interface?


Re: A new blog article detailing the alternative function syntax

2013-08-09 Thread Dejan Lekic

On Thursday, 8 August 2013 at 19:24:31 UTC, Ary Borenszweig wrote:

On 8/8/13 3:53 PM, Gary Willoughby wrote:
I've just finished a new blog article on the subject of 
alternative
function syntax in D. I guess this is pretty straightforward 
stuff to
all the people here but was a major source of confusion to me 
(and

others?) when first learning D.

I personally think this is more confusing than many people 
think.
Hopefully this will quickly arm a developer with knowledge to 
be able to
read and understand most D code. Let me know if i've missed 
anything

important.

http://nomad.so/2013/08/alternative-function-syntax-in-d/

I'll post to reddit in the morning.


Nice article.

But when I read alternative function syntax I thought your 
article was a proposal for that, an alternative function 
syntax. :-P


Maybe it should be renamed to something else... but I don't 
know enough English to suggest that.


I agree, the article title should be something like Uniform 
Function Call Syntax. Exactly like in in this article: 
http://www.drdobbs.com/cpp/uniform-function-call-syntax/232700394 
.


Re: A new blog article detailing the alternative function syntax

2013-08-09 Thread Andrei Alexandrescu

On 8/9/13 1:03 AM, Gary Willoughby wrote:

On Thursday, 8 August 2013 at 22:37:04 UTC, Andrei Alexandrescu wrote:

If you want me to post to reddit tomorrow morning, let me know. My
good post karma is likely to push the post into visibility quickly. On
the other hand, if you post it yourself it will improve _your_ karma.
Tradeoffs, tradeoffs...


Sure go ahead.


Much obliged:

http://www.reddit.com/r/programming/comments/1k18ls/alternative_function_syntax_in_d_explained/


Andrei


A new blog article detailing the alternative function syntax

2013-08-08 Thread Gary Willoughby
I've just finished a new blog article on the subject of 
alternative function syntax in D. I guess this is pretty 
straightforward stuff to all the people here but was a major 
source of confusion to me (and others?) when first learning D.


I personally think this is more confusing than many people think. 
Hopefully this will quickly arm a developer with knowledge to be 
able to read and understand most D code. Let me know if i've 
missed anything important.


http://nomad.so/2013/08/alternative-function-syntax-in-d/

I'll post to reddit in the morning.


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Walter Bright

On 8/8/2013 12:15 PM, Walter Bright wrote:

s/compliments/complements/


The frequency with which I see this error is a pet peeve of mine!



Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Walter Bright

On 8/8/2013 11:53 AM, Gary Willoughby wrote:

I personally think this is more confusing than many people think. Hopefully this
will quickly arm a developer with knowledge to be able to read and understand
most D code. Let me know if i've missed anything important.

http://nomad.so/2013/08/alternative-function-syntax-in-d/


s/compliments/complements/

s/-profile/-property/

s/behaviour/behavior/ if you mean to use the american english spelling

s/explained the rules/explained that the rules/

s/ommited/omitted/

s/in the call parens/in the call then parens/

s/i've/I've/

Under Extension Methods, a huge reason for them is to head off the temptation to 
write 'kitchen sink' classes that are filled with every conceivable method. The 
desired approach is to have the class implement the bare minimum of 
functionality, and add other functionality with extension methods (that do not 
have access to the class' private state).


All in all, good article!


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Ary Borenszweig

On 8/8/13 3:53 PM, Gary Willoughby wrote:

I've just finished a new blog article on the subject of alternative
function syntax in D. I guess this is pretty straightforward stuff to
all the people here but was a major source of confusion to me (and
others?) when first learning D.

I personally think this is more confusing than many people think.
Hopefully this will quickly arm a developer with knowledge to be able to
read and understand most D code. Let me know if i've missed anything
important.

http://nomad.so/2013/08/alternative-function-syntax-in-d/

I'll post to reddit in the morning.


Nice article.

But when I read alternative function syntax I thought your article was 
a proposal for that, an alternative function syntax. :-P


Maybe it should be renamed to something else... but I don't know enough 
English to suggest that.


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Tofu Ninja

On Thursday, 8 August 2013 at 19:24:31 UTC, Ary Borenszweig wrote:

On 8/8/13 3:53 PM, Gary Willoughby wrote:
I've just finished a new blog article on the subject of 
alternative
function syntax in D. I guess this is pretty straightforward 
stuff to
all the people here but was a major source of confusion to me 
(and

others?) when first learning D.

I personally think this is more confusing than many people 
think.
Hopefully this will quickly arm a developer with knowledge to 
be able to
read and understand most D code. Let me know if i've missed 
anything

important.

http://nomad.so/2013/08/alternative-function-syntax-in-d/

I'll post to reddit in the morning.


Nice article.

But when I read alternative function syntax I thought your 
article was a proposal for that, an alternative function 
syntax. :-P


Maybe it should be renamed to something else... but I don't 
know enough English to suggest that.


Maybe unique instead of alternative?


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Gary Willoughby

On Thursday, 8 August 2013 at 19:15:29 UTC, Walter Bright wrote:

lots...


I've made the corrections, thanks. I really need to work on my 
English. I haven't written anything in years and it's harder work 
than i remember. Nothing that practise, practise, practise ...and 
a spell checker won't fix! ;)


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread anonymous

On Thursday, 8 August 2013 at 18:53:47 UTC, Gary Willoughby wrote:
I've just finished a new blog article on the subject of 
alternative function syntax in D. I guess this is pretty 
straightforward stuff to all the people here but was a major 
source of confusion to me (and others?) when first learning D.


I personally think this is more confusing than many people 
think. Hopefully this will quickly arm a developer with 
knowledge to be able to read and understand most D code. Let me 
know if i've missed anything important.


http://nomad.so/2013/08/alternative-function-syntax-in-d/

I'll post to reddit in the morning.


I think you should mention the terms UFCS and IFTI, since those 
are used by D folk.


UFCS: Universal Function Call Syntax, i.e. dot notation.
IFTI: Implicit Function Template Instantiation, i.e. template 
parameters can be omitted when they can be deduced from the 
function arguments.


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Gary Willoughby

On Thursday, 8 August 2013 at 20:37:35 UTC, anonymous wrote:
I think you should mention the terms UFCS and IFTI, since those 
are used by D folk.


UFCS: Universal Function Call Syntax, i.e. dot notation.
IFTI: Implicit Function Template Instantiation, i.e. template 
parameters can be omitted when they can be deduced from the 
function arguments.


Good point.


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Brad Anderson

On Thursday, 8 August 2013 at 19:18:22 UTC, Walter Bright wrote:

On 8/8/2013 12:15 PM, Walter Bright wrote:

s/compliments/complements/


The frequency with which I see this error is a pet peeve of 
mine!


I know! It's rediculous!


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Brad Anderson

On Thursday, 8 August 2013 at 19:15:29 UTC, Walter Bright wrote:
Under Extension Methods, a huge reason for them is to head off 
the temptation to write 'kitchen sink' classes that are filled 
with every conceivable method. The desired approach is to have 
the class implement the bare minimum of functionality, and add 
other functionality with extension methods (that do not have 
access to the class' private state).




http://www.drdobbs.com/cpp/how-non-member-functions-improve-encapsu/184401197#.UW1X9HWZeXA.reddit

I think you linked this Meyers article at some point as being the 
original rationale for UFCS (correct me if I'm wrong).


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Andrei Alexandrescu

On 8/8/13 1:28 PM, Gary Willoughby wrote:

On Thursday, 8 August 2013 at 19:15:29 UTC, Walter Bright wrote:

lots...


I've made the corrections, thanks. I really need to work on my English.
I haven't written anything in years and it's harder work than i
remember. Nothing that practise, practise, practise ...and a spell
checker won't fix! ;)


s/practise/practice/g :o)

If you want me to post to reddit tomorrow morning, let me know. My good 
post karma is likely to push the post into visibility quickly. On the 
other hand, if you post it yourself it will improve _your_ karma. 
Tradeoffs, tradeoffs...


Andrei



Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Walter Bright

On 8/8/2013 3:02 PM, Brad Anderson wrote:

On Thursday, 8 August 2013 at 19:15:29 UTC, Walter Bright wrote:

Under Extension Methods, a huge reason for them is to head off the temptation
to write 'kitchen sink' classes that are filled with every conceivable method.
The desired approach is to have the class implement the bare minimum of
functionality, and add other functionality with extension methods (that do not
have access to the class' private state).



http://www.drdobbs.com/cpp/how-non-member-functions-improve-encapsu/184401197#.UW1X9HWZeXA.reddit


I think you linked this Meyers article at some point as being the original
rationale for UFCS (correct me if I'm wrong).


You're right. I was just too lazy to link to it myself. Thanks for doing it.

BTW, I think that article is required reading. It's an easy read, and was an 
eye-opener for me.


Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Jesse Phillips

On Thursday, 8 August 2013 at 18:53:47 UTC, Gary Willoughby wrote:
I've just finished a new blog article on the subject of 
alternative function syntax in D. I guess this is pretty 
straightforward stuff to all the people here but was a major 
source of confusion to me (and others?) when first learning D.


I personally think this is more confusing than many people 
think. Hopefully this will quickly arm a developer with 
knowledge to be able to read and understand most D code. Let me 
know if i've missed anything important.


http://nomad.so/2013/08/alternative-function-syntax-in-d/

I'll post to reddit in the morning.


The second non-member function example is part of the -property 
controversy.


foo = 123;  // called as foo(123)

Not sure if you'd want that mentioned.



Re: A new blog article detailing the alternative function syntax

2013-08-08 Thread Miles Stoudenmire
s/quiet easily/quite easily/g

Nice article. I wish C++ had UFCS...


On 8 August 2013 20:40, Jesse Phillips jesse.k.phillip...@gmail.com wrote:

 On Thursday, 8 August 2013 at 18:53:47 UTC, Gary Willoughby wrote:

 I've just finished a new blog article on the subject of alternative
 function syntax in D. I guess this is pretty straightforward stuff to all
 the people here but was a major source of confusion to me (and others?)
 when first learning D.

 I personally think this is more confusing than many people think.
 Hopefully this will quickly arm a developer with knowledge to be able to
 read and understand most D code. Let me know if i've missed anything
 important.

 http://nomad.so/2013/08/**alternative-function-syntax-**in-d/http://nomad.so/2013/08/alternative-function-syntax-in-d/

 I'll post to reddit in the morning.


 The second non-member function example is part of the -property
 controversy.

 foo = 123;  // called as foo(123)

 Not sure if you'd want that mentioned.




-- 
   -=Miles Stoudenmire=-
   miles.stoudenm...@gmail.com
   estou...@uci.edu
   http://itensor.org/miles/