On Tue, Jul 16, 2013 at 9:55 PM, Bennie Kloosteman <[email protected]> wrote:
> "You really can't have this both ways. Either features like traits and
> implementations matter, in which case my programming in the large concerns
> come into play, or those features don't matter, in which case Rust isn't an
> enhancement of C. Pick one."
>
> Why cant i have a large standard lib ...with traits and use a lot of c style
> modules in my code "modules" ? Together they form a large app...
>
> By "module" i wasnt thinking a rust crate , more say a WCF service .. with
> loosely coupled message style async communication via pipe / shared memory.
> C# can do it but C# cant do it pauseless ... nor can i build such a
> framework in  C#..
>
> "App architecture is unquestionably important. No argument. Nonetheless,
> mistakes in the language design - in this case the absence of lexical
> scoping for impls (aka type class instances) - can destroy any hope of
> success for the best imaginable architecture."
>
> I dont think it stopped Haskell ... and for the system programming core it
> will be even less important ... Im quite sure you can write s decent kernel
> or service  with rust .. Im not convinced you can do a 3D app ( in non c
> style)  due to the large amount of concpets embeded in the types . That said
> it imay  still better than C++.

Am I correct that this discussion is about whether orphan instances
are important?  If so, banning orphan instances makes a language
substantially worse than C++, in ways that will certainly damage even
medium scale software.

One easy example from our code is an overloaded "to_python" function
that converts certain C++ objects into Python objects.  Say the
to_python trait/type class is declared in library A, there's an
unrelated library B written by someone who doesn't care about Python,
and library C depends on both A and B.  As soon as C wants the ability
to convert B's types to Python, we have orphan instances.

C++ solves this by making namespaces open, so that C can inject
to_python overloads into B's namespace to be found via Koenig lookup.
This may be a hack, but it's an extremely useful one that I would not
want to lose.

Geoffrey
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to