November 10, 2012
On Saturday, November 10, 2012 11:03:31 Jacob Carlborg wrote:
> On 2012-11-10 06:28, Jonathan M Davis wrote:
> > package restricts access to the same package. D has no concept like C#'s internal, because it doesn't have assemblies.
> 
> I'm not entirely sure how assemblies work in C# but couldn't one say that everything in D is internal unless explicitly marked as export?

I guess, but that's purely a Windows dll thing. Linux isn't stupid enough to be affected by export at all (export is one of my biggest pet peeves with Windows - I absolutely hate it; it's just caused me way too much trouble).

- Jonathan M Davis
November 11, 2012
On Saturday, 10 November 2012 at 18:35:57 UTC, Jonathan M Davis wrote:
>
> Object-oriented code not use virtual functions much? If you don't need virtual
> functions, then use a struct, not a class. Classes are polymorphic. Structs
> are not. In general, it doesn't make a lot of sense to use a class in D if you
> don't need polymorphism. And if you do need to but don't want the functions to
> be virtual (e.g. you want to use a class, because you want a reference type
> without going to the trouble of making a struct a reference type), then you
> can just make all of the class' public functions final. But that's not the
> normal case at all.
>
> - Jonathan M Davis

You didn't understand me. I mean that only less 30% of public functions in typical class must be virtual in most cases. And fact, that i need use 'final' for 70% public functions, is not comfortable. It is my humble opinion.

Sorry for my bad English.
1 2
Next ›   Last »