On Thursday, 30 November 2017 at 06:44:43 UTC, Jonathan M Davis
wrote:
Object exists primarily because D didn't originally have
templates, and when you don't have templates, having a single
base class is the only way to have a function accept any class,
and for something like a container,
On Thursday, November 30, 2017 10:54:44 helxi via Digitalmars-d-learn wrote:
> On Thursday, 30 November 2017 at 06:44:43 UTC, Jonathan M Davis
>
> wrote:
> > On Thursday, November 30, 2017 06:29:43 helxi via
>
> > Digitalmars-d-learn wrote:
> []
>
> > I don't understand the question. You're asking
On Thursday, 30 November 2017 at 06:44:43 UTC, Jonathan M Davis
wrote:
On Thursday, November 30, 2017 06:29:43 helxi via
Digitalmars-d-learn wrote:
[]
I don't understand the question. You're asking whether casting
from a base class to a derived class creates overhead? Or are
you asking
On Thursday, November 30, 2017 06:29:43 helxi via Digitalmars-d-learn wrote:
> 1. Why are imports visible from outside the package when you do
> selective imports?
>
> //mod.d
> module mod;
>
> import std.stdio : writeln;
>
> public void greet()
> {
> writeln("Hello");
> }
>
>
> //app.d
>
1. Why are imports visible from outside the package when you do
selective imports?
//mod.d
module mod;
import std.stdio : writeln;
public void greet()
{
writeln("Hello");
}
//app.d
import mod;
void main()
{
mod.greet();
writeln("You should not be seeing this.");
}