View previous topic :: View next topic |
Author |
Message |
davidb
Joined: 03 Apr 2007 Posts: 15
|
Posted: Thu Apr 26, 2007 10:46 am Post subject: |
|
|
If I have understood you right (about static constructors), why not just use
static this()
{
staticThisInit();
}
staticThisInit()
{
thisfirst.open();
whatever.open();
thislast.open();
}
?
When the bug gets fixed, the correction needed is minimal.
That said, I too would use it only where you can't provide arguments to the .open() functions.
david |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Thu Apr 26, 2007 1:57 pm Post subject: |
|
|
The problem with that, is that, say, you have a window module
module window;
which has to import every single module that has an .open and .close facility.
import input, log, font;
static this()
{
input.open(); font.open(); log.open();
}
would be good for controlling the order of the operations, but bad because window shouldn't have to import things it doesn't really use. |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Sun Apr 29, 2007 7:04 am Post subject: |
|
|
I'm missing font.open. Calling font.initFont seems to do it - can you add the open and close functions? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|