August 08, 2013
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

August 09, 2013
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.
August 09, 2013
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.

August 09, 2013
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.
August 09, 2013
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.
August 09, 2013
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 .
August 09, 2013
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
August 10, 2013
Quick question: does UFCS allow you to make a type implement an interface?


August 10, 2013
s/quiet easily/quite easily/g

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


On 8 August 2013 20:40, Jesse Phillips <Jesse.K.Phillips+D@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.stoudenmire@gmail.com
   estouden@uci.edu
   http://itensor.org/miles/


August 10, 2013
On Friday, August 09, 2013 12:25:25 Rory McGuire wrote:
> Quick question: does UFCS allow you to make a type implement an interface?

No. _All_ that UFCS does is take

auto result = foo.bar(args);

and lower it to

auto result = bar(foo, args);

It's purely syntactic sugar, much as that sugar has some great benefits for generic code. For a class to implement an interface method, that method must actually be part of the class or one of its base classes.

- Jonathan M Davis
1 2
Next ›   Last »