seeding the pot for 2.0 features
kris
foo at bar.com
Tue Jan 23 14:41:55 PST 2007
BCS wrote:
> Reply to kris,
>
>> Hrm, I may be a dolt but the above looks like greek -- I have no idea,
>> at first glance, what the heck it does -- that's an important concern
>> for the target audience, surely? Actually, what is the target audience
>> for D? Specifically? Perhaps that's a good place to start :)
>>
>> Other than that, my suggestions for 2.0 would be to fix the problems
>> in 1.0. The dreaded mixin noted above is a case in point. How about
>> /removing/ that broken macro-expansion feature for 2.0 :D
>>
>> (somewhat tongue-in-cheek)
>>
>
> The basic idea that spawned the suggestion was to have a template class
> that implements an arbitrary interface and provides the functionality to
> transport it across a network connection. Given an interface.
>
> interface I
> {
> int foo();
> }
>
> A server side program would do something like this.
>
> class C : I
> {
> int foo()
> {
> static int i = 0;
> return i++;
> }
> }
>
> ServeInterface!(I)(new C);
>
> and the client would do this:
>
> auto ref = new ConnectInterface!(I)("some.domain.name.org",port);
>
> writef("%d\n", ref.foo());
>
> thus getting access to the C on the server.
>
> I have written a code generator to do this but is is vary painful to
> work with.
>
>
Yeah, please forgive me for being a bit flippant; I really didn't get
#2, so examples are helpful :)
More information about the Digitalmars-d
mailing list