On Mon, 04 May 2009 18:23:50 -0700, Robert Fraser wrote:
Daniel Keep wrote:
Also Namespaces can use upper case characters... documentation
indicates that package and module names should be written all in lower
case.
Oh what rubbish. You can use whatever case you please.
On Windows
On Wed, 06 May 2009 02:36:21 +0400, Christopher Wright dhase...@gmail.com
wrote:
I see no use case for having one module in multiple files, though -- the
only benefit would be private access to things defined in other files.
I've never been big on making stuff private, though.
There is a
I don't want to split a big class into several smaller classes, just to
be able to distribute it across several source files.
Actually, the D module system makes me to implement several aspects of
something as several classes. Just to be able to put the implementation
into several files. Of
Denis Koroskin wrote:
On Wed, 06 May 2009 02:36:21 +0400, Christopher Wright
dhase...@gmail.com wrote:
I see no use case for having one module in multiple files, though --
the only benefit would be private access to things defined in other
files. I've never been big on making stuff private,
Christopher Wright wrote:
Fractal wrote:
That's debatable. The hateful thing about namespaces is that they give
you absolutely ZERO clue as to where any particular thing is coming
from.
If I see tango.io.device.File, I know exactly where the source for
that module is.
-- Daniel
Yes it
On Tue, 05 May 2009 09:50:24 +0400, Yigal Chripun yigal...@gmail.com wrote:
bearophile wrote:
Yigal Chripun:
the downside to the current system is when you have one class in a
file, the full name of it will be SomeClass.SomeClass instead of just
SomeClass. (because of the redundancy of the
Yigal Chripun wrote:
*but*, I do think that splitting one file that got too big over time or
uniting a bunch of small files into one should be possible.
This would be especially good for us. D is mainly developed by
individuals, and there projects tend to grow organically -- as opposed
to
Georg Wrede wrote:
Yigal Chripun wrote:
*but*, I do think that splitting one file that got too big over time
or uniting a bunch of small files into one should be possible.
This would be especially good for us. D is mainly developed by
individuals, and there projects tend to grow organically
Christopher Wright wrote:
Georg Wrede wrote:
Yigal Chripun wrote:
*but*, I do think that splitting one file that got too big over time
or uniting a bunch of small files into one should be possible.
This would be especially good for us. D is mainly developed by
individuals, and there
grauzone wrote:
Christopher Wright wrote:
It *is* possible, by use of public imports.
Are you splitting one file into many? Public import the other modules.
Are you merging many files into one? Leave the other files with just a
public import of the merged file.
Nice story. In reality you
Ellery Newcomer wrote:
Nick Sabalausky wrote:
-
//File: foo/fooA.d
module foo.fooA;
class fooA {}
//File: foo/fooB.d
module foo.fooB;
class fooB {}
//File: foo/fooC.d
module foo.fooC;
class fooC {}
//File: foo/all.d
module foo.all;
public import foo.fooA;
Nick Sabalausky Wrote:
Fractal d294...@bsnow.net wrote in message
news:gtlihm$tt...@digitalmars.com...
The namespaces: i used them with C++, and the idea of separation between
the uses of types, makes a very good layout. Because some namespaces
requires more types, always i write
Hello Saaa,
mixins are just code in string form, right?
No that's mixin(string), there is also mixin Template!(); that plops
the template content into its scope.
Hello Fractal,
Templates: i dont use templates or mixins. they really confuses me and
i think so that they only should be used for array classes or
something similar.
I'm biased (as I love playing with them) but templates can be used for a
LOT more than that. Most of the time the end user
Ah, ok thanks.
I should really start reading about those template things :)
Hello Saaa,
mixins are just code in string form, right?
No that's mixin(string), there is also mixin Template!(); that plops
the template content into its scope.
Daniel Keep wrote:
Liang Du wrote:
Nick Sabalausky Wrote:
Fractal d294...@bsnow.net wrote in message
news:gtlihm$tt...@digitalmars.com...
The namespaces: i used them with C++, and the idea of separation between
the uses of types, makes a very good layout. Because some namespaces
requires
Yigal Chripun:
the downside to the current system is when you have one class in a file,
the full name of it will be SomeClass.SomeClass instead of just
SomeClass. (because of the redundancy of the module decl. in this case)
Generally if classes or functions are small, you put more than one
That's debatable. The hateful thing about namespaces is that they give
you absolutely ZERO clue as to where any particular thing is coming from.
If I see tango.io.device.File, I know exactly where the source for
that module is.
-- Daniel
Yes it is true. But the thing is not where is
Fractal:
Really module, packages, and namespaces are the same thing.
Not really :-) There are semantic differences.
Bye,
bearophile
Fractal wrote:
That's debatable. The hateful thing about namespaces is that they give
you absolutely ZERO clue as to where any particular thing is coming from.
If I see tango.io.device.File, I know exactly where the source for
that module is.
-- Daniel
Yes it is true. But the thing
Daniel Keep wrote:
Also Namespaces can use upper case characters... documentation indicates that
package and module names should be written all in lower case.
Oh what rubbish. You can use whatever case you please.
On Windows (actually NTFS, I think), you can't two packages/modules that
Fractal wrote:
That's debatable. The hateful thing about namespaces is that they give
you absolutely ZERO clue as to where any particular thing is coming from.
If I see tango.io.device.File, I know exactly where the source for
that module is.
-- Daniel
Yes it is true. But the thing is not
Hello
After using the D1 language i have some questions about it:
- Why i cant use many files with the same module name? I want to use modules
like .NET or C++ namespaces and the file has 10K lines and finding a line takes
many time...
- Why there is no ranged foreach in D1?
- Why there is
Fractal wrote:
- Why i cant use many files with the same module name? I want to use
modules like .NET or C++ namespaces and the file has 10K lines and
finding a line takes many time...
Errr... no offense, but that kinda sounds like a bad design...
- Why there is no ranged foreach in D1?
Fractal wrote:
Hello
After using the D1 language i have some questions about it:
- Why i cant use many files with the same module name? I want to use modules
like .NET or C++ namespaces and the file has 10K lines and finding a line
takes many time...
Because in D, the module name
== Quote from Fractal (d294...@bsnow.net)'s article
Hello
After using the D1 language i have some questions about it:
- Why i cant use many files with the same module name? I want to use modules
like .NET or C++ namespaces and the file has 10K lines and finding a line takes
many time...
If I
Hello, and welcome Fractal. I can give you some answers; other people will fill
the missing ones.
I can see you come from C#. D isn't C#, and not everything C# does differently
from D is an mistake of the D design. Sometimes it's just a different way to do
things, sometimes it's a design that
interface I
{
void shine();
}
class C : I
{
final void shine() { }
}
void main()
{
C c = new C();
I i = c;
I didn't know an interface could hold the data of an class or am I seeing
this wrong?
i.shine(); // Virtual
c.shine(); // Direct
}
Hello again...
Thanks for the quick responses! and sorry... if my english is very bad :)
C#: No, i dont have been used C# for anything. But i like the .NET framework
structure. How ever not at all (it also uses interfaces).
The namespaces: i used them with C++, and the idea of separation
Templates: i dont use templates or mixins. they really confuses me and i
think so that they only should be used for array classes or something
similar.
Do you mean you don't understand the concept of mixins or that it makes
reading the code more difficult?
If it is the first then I don't
Saaa Wrote:
Templates: i dont use templates or mixins. they really confuses me and i
think so that they only should be used for array classes or something
similar.
Do you mean you don't understand the concept of mixins or that it makes
reading the code more difficult?
If it is the
Saaa Wrote:
Templates: i dont use templates or mixins. they really confuses me and i
think so that they only should be used for array classes or something
similar.
Do you mean you don't understand the concept of mixins or that it makes
reading the code more difficult?
If it is the
; )
But I understand where you are coming from.
Please ask as many questions as you want. They teach me as well :)
with a systems programming language ; )
But I understand where you are coming from.
Please ask as many questions as you want. They teach me as well :)
D is for me a very good language. At the time everything that i want to do, is
possible with it. And i have deleted all the C++ code and replaced
Fractal d294...@bsnow.net wrote in message
news:gtlihm$tt...@digitalmars.com...
The namespaces: i used them with C++, and the idea of separation between
the uses of types, makes a very good layout. Because some namespaces
requires more types, always i write each class in separate files. D
Fractal Wrote:
D is for me a very good language. At the time everything that i want to do,
is possible with it. And i have deleted all the C++ code and replaced it with
D.
here's 1 happy dood without a legacy code problem. boy how i miss kindergarten.
welcome 2 da club kiddo.
Nick Sabalausky wrote:
-
//File: foo/fooA.d
module foo.fooA;
class fooA {}
//File: foo/fooB.d
module foo.fooB;
class fooB {}
//File: foo/fooC.d
module foo.fooC;
class fooC {}
//File: foo/all.d
module foo.all;
public import foo.fooA;
public import foo.fooB;
37 matches
Mail list logo