public import and bugs it causes

bearophile bearophileHUGS at lycos.com
Fri May 14 14:03:57 PDT 2010


Alex Makhotin:

> I think this is a bad design of the language.
> Global variables are bad things.
> C# doesn't have them.
> In this sense I like C# which prohibits any fields or methods in namespaces.

Global variables are tricky and it's better to minimize them, but they are sometimes useful, or they can give some extra performance, etc.
Global functions (not called methods if they aren't inside a function) are very useful. You have to learn that there is more than OOP in the life of a programmer. Not all my programs contain classes.

Bye,
bearophile


More information about the Digitalmars-d mailing list