Vision document for H1 2018

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Fri Mar 16 19:08:47 UTC 2018


On 03/16/2018 02:35 PM, Tony wrote:
> On Friday, 16 March 2018 at 15:04:21 UTC, Kagamin wrote:
>> On Thursday, 15 March 2018 at 16:03:14 UTC, rumbu wrote:
>>> Are you sure that you are talking about phobos and not tango? :)
>>> I'm eager to find how I'm uninformed.
>>
>> Tango doesn't use UFCS, while phobos and .net framework are big on 
>> extension methods. Also tango uses object oriented console IO, while 
>> phobos and .net framework use procedural style for it.
> 
> I thought C# was like Java and does not allow free procedures. Can you 
> give an example of C# procedural-style IO?
> 

It doesn't (last I used it), buy you CAN mark individual member 
functions to be usable UFCS-like. IIRC, I think it might have to be 
static member function.

It's been awhile, so I don't remember it exactly, but it's something 
like this:

class Bar {}

class Foo {
     static void SomeFunc(extention Bar bar, int num) {...}
}

class MyApp {
     static void Run() {
         Bar bar = new Bar();
         bar.SomeFunc(2);
     }
}


More information about the Digitalmars-d-announce mailing list