On 2011-12-03 02:44, Adam D. Ruppe wrote:
Walter Bright Wrote:
It's too bad there's no way to 'bind' arbitrary data to shared executable
library files
Would using the resource compiler work on Windows? I'm pretty sure dlls
have icon resources just like exes, so having a string resource in
On 11/28/2011 9:40 AM, Timon Gehr wrote:
On 11/28/2011 05:41 PM, Alexey Veselovsky wrote:
Separate hand written specification is rulez for human. It is best
short module description (with some useful manually written comments).
I like it more then autogenerated docs (by doxygen and so on).
On 11/28/2011 8:07 AM, Maxim Fomin wrote:
Probably i am mistaken that this post supports D modules
(in a way, showing that header files are crap), but ...
In C# no headers are required, because it includes metadata in dynamic library.
In your example you link code to compiled library without
Walter Bright Wrote:
It's too bad there's no way to 'bind' arbitrary data to shared executable
library files
Would using the resource compiler work on Windows? I'm pretty sure dlls
have icon resources just like exes, so having a string resource in there might
work too.
(I don't know that
On 12/2/2011 5:44 PM, Adam D. Ruppe wrote:
Walter Bright Wrote:
It's too bad there's no way to 'bind' arbitrary data to shared executable
library files
Would using the resource compiler work on Windows? I'm pretty sure dlls
have icon resources just like exes, so having a string resource in
On 11/29/2011 1:46 AM, Peter Alexander wrote:
Which means you also get a horrible O(n) algorithm for something that should be
a couple of compares. Why DMD does this is beyond me.
I did it to get it up and running, and haven't revisited that yet.
Global float arrays can bloat executables as
Kagamin Wrote:
bearophile Wrote:
And this is positive because?
You say it as if it's negative.
For me it is negative as what I understood from this discussion is that
contrary to what is described in TDPL, D modules are not ready to prime time.
At least at the level Modula-2(3), Ada,
On 29/11/11 2:12 AM, Marco Leise wrote:
Am 28.11.2011, 14:42 Uhr, schrieb Maxim Fomin ma...@maxim-fomin.ru:
2011/11/28 Marco Leise marco.le...@gmx.de:
Am 28.11.2011, 11:02 Uhr, schrieb Jude 10equa...@gmail.com:
I tried to write a lib and a project, which used that lib
separately, but came
Paulo Pinto Wrote:
Kagamin Wrote:
bearophile Wrote:
And this is positive because?
You say it as if it's negative.
For me it is negative as what I understood from this discussion is that
contrary to what is described in TDPL, D modules are not ready to prime time.
At
Maxim Fomin Wrote:
C#: as example above. No headers. Private members are not known.
Maxim Fomin Wrote:
C#: as example above. No headers. Private members are not known.
Hmm... Really? Though I remember something about can't access private member
errors. And yes, metadata sells you everything
On 11/28/2011 08:40 PM, Walter Bright wrote:
On 11/28/2011 4:00 AM, Alexey Veselovsky wrote:
ok. I just removed from test.di all non public entities.
// D import file generated from 'test.d'
module test;
public
{
void foo();
struct Boo
{
public
{
void boo();
}
}
}
Now, let's build it:
$ dmd
On Mon, 28 Nov 2011 03:44:23 +0200, Walter Bright
newshou...@digitalmars.com wrote:
On 11/27/2011 4:44 PM, Alexey Veselovsky wrote:
D has a true module system that supports separate compilation and
generates and uses module summaries (highbrowspeak for header files)
automatically from
2011/11/28 so s...@so.so:
On Mon, 28 Nov 2011 03:44:23 +0200, Walter Bright
newshou...@digitalmars.com wrote:
On 11/27/2011 4:44 PM, Alexey Veselovsky wrote:
D has a true module system that supports separate compilation and
generates and uses module summaries (highbrowspeak for header
On Mon, 28 Nov 2011 11:01:31 +0200, Maxim Fomin ma...@maxim-fomin.ru
wrote:
In D, when compiler generate interface it effectively dumps
implementation in .di file.
This is what i meant by saying it doesn't make sense, it is an
auto-generated file.
You can argue about .di shortcomings but
I come from the C++ world as well. I still do some C++ work, mostly related
to my legacy applications... C++ has no modules. End of story. Header files
are not modules, they are just... piece of source code. I also did some
(toy) Modula-3 projects in the past, and must admit I adore the
On Mon, 28 Nov 2011 11:01:31 +0200, Maxim Fomin ma...@maxim-fomin.ru
wrote:
It is true and makes sense until D will stop claiming .di files are
interface files.
I also was curious how should i replace C library style with .h and .c
files.
In D, when compiler generate interface it
On Sun, Nov 27, 2011 at 6:44 PM, Alexey Veselovsky
alexey.veselov...@gmail.com wrote:
I'm trying to switch from C++ to D. But I can't find some things that
I love in C++. For example in C++ I can separate module specification
and implementation. Advertising article The Case for D says that it
On Mon, 28 Nov 2011 11:42:24 +0200, Caligo iteronve...@gmail.com wrote:
On Sun, Nov 27, 2011 at 6:44 PM, Alexey Veselovsky
alexey.veselov...@gmail.com wrote:
I'm trying to switch from C++ to D. But I can't find some things that
I love in C++. For example in C++ I can separate module
The separation of specification and implementation in C/C++ is not some
feature that they came up. I would call it a design defect. Having to
split up code between header files and source files is one of the things I
dislike about C/C++. As for why anyone would be in love with such a thing,
On Mon, 28 Nov 2011 09:40:06 +0200, Alexey Veselovsky
alexey.veselov...@gmail.com wrote:
Now, let's try this on D:
// Implementation
module test;
public {
void foo() {foo_helper();}
struct Boo
{
public:
void boo() {S ss; foo_helper();}
private:
struct S
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I tried to write a lib and a project, which used that lib
separately, but came to conclusion that the best choice it to pull
lib code to project one. And it is not a biggest problem, because
dmd produces 700 kb executable for hello word
I think that D should provide an opportunity for both styles: with or
without specification separation from implementation. In some cases I
prefer to not separate implementation (small programs / scripts), but
in some projects I really need to separate implementation from
manually written
On 11/27/2011 11:40 PM, Alexey Veselovsky wrote:
Also I can't
write method implementation in different (implementation) file
(without inheritance).
-- .di file
module foo;
int bar();
-- .d file -
module foo;
int bar() { return 3; }
Am 28.11.2011, 11:02 Uhr, schrieb Jude 10equa...@gmail.com:
I tried to write a lib and a project, which used that lib
separately, but came to conclusion that the best choice it to pull
lib code to project one. And it is not a biggest problem, because
dmd produces 700 kb executable for hello
Also I can't
write method implementation in different (implementation) file
(without inheritance).
-- .di file
module foo;
int bar();
-- .d file -
module foo;
int bar() { return 3; }
Method, not global function.
struct Foo {
void foo();
module foo;
struct Foo {
void foo();
}
-- .d file -
module foo;
struct Foo {
void foo() { ... code ... }
}
ok. What about:
struct Foo {
int a;
int b;
// 100 more fields
...
void foo();
}
Did I must write in implementation
On Mon, 28 Nov 2011 13:32:12 +0200, Walter Bright
newshou...@digitalmars.com wrote:
On 11/28/2011 3:19 AM, Alexey Veselovsky wrote:
Also I can't
write method implementation in different (implementation) file
(without inheritance).
-- .di file
module foo;
struct
On 11/28/2011 11:44 AM, so wrote:
On Mon, 28 Nov 2011 11:42:24 +0200, Caligo iteronve...@gmail.com wrote:
On Sun, Nov 27, 2011 at 6:44 PM, Alexey Veselovsky
alexey.veselov...@gmail.com wrote:
I'm trying to switch from C++ to D. But I can't find some things that
I love in C++. For example in
ok. I just removed from test.di all non public entities.
// D import file generated from 'test.d'
module test;
public
{
void foo();
struct Boo
{
public
{
void boo();
}
}
}
Now, let's build it:
$ dmd test.di test.d main.d
test.d: Error: module
On Mon, 28 Nov 2011 13:58:25 +0200, Max Samukha max...@spambox.com wrote:
How would you write libraries?
The way they do, for example, in C# - interface definitions are stored
in the library, no need for separate headers.
Are we talking about the same thing?
Something like
On 2011-11-28 10:01, Maxim Fomin wrote:
I tried to write a lib and a project, which used that lib separately,
but came to conclusion
that the best choice it to pull lib code to project one.
And it is not a biggest problem, because dmd produces 700 kb
executable for hello word program.
Neither
On 11/28/2011 02:29 PM, so wrote:
On Mon, 28 Nov 2011 13:58:25 +0200, Max Samukha max...@spambox.com wrote:
How would you write libraries?
The way they do, for example, in C# - interface definitions are stored
in the library, no need for separate headers.
Are we talking about the same
2011/11/28 Marco Leise marco.le...@gmx.de:
Am 28.11.2011, 11:02 Uhr, schrieb Jude 10equa...@gmail.com:
I tried to write a lib and a project, which used that lib
separately, but came to conclusion that the best choice it to pull
lib code to project one. And it is not a biggest problem, because
On Mon, 28 Nov 2011 15:34:19 +0200, Max Samukha max...@spambox.com wrote:
No, it has nothing to do with the IDE. The article describes a visual
tool for viewing meta-data stored in a .NET binary. You don't have to
use it.
Specially for you, die-hard IDE haters, this is how to use the
On Mon, 28 Nov 2011 15:52:51 +0200, so s...@so.so wrote:
Now how do you know you have a Lib, and it implements hello, what
rule enforces that?
If this is all it does, you are overlooking the most important point of
header files.
It was obscure.
A header enforces its contents for both
2011/11/28 Max Samukha max...@spambox.com:
On 11/28/2011 02:29 PM, so wrote:
On Mon, 28 Nov 2011 13:58:25 +0200, Max Samukha max...@spambox.com
wrote:
How would you write libraries?
The way they do, for example, in C# - interface definitions are stored
in the library, no need for separate
On 11/28/2011 03:52 PM, so wrote:
On Mon, 28 Nov 2011 15:34:19 +0200, Max Samukha max...@spambox.com wrote:
No, it has nothing to do with the IDE. The article describes a visual
tool for viewing meta-data stored in a .NET binary. You don't have to
use it.
Specially for you, die-hard IDE
On 11/28/2011 04:05 PM, so wrote:
For the second part if library writer changes anything with
implementation, that would not affect the user.
In your case it does, because there is no distinction between
specification and implementation
There is, but the specification is bundled with the
On Mon, 28 Nov 2011 18:21:03 +0200, Max Samukha max...@spambox.com wrote:
Could you clarify what is the most important part?
As i tried in the above post, header files are specs, a contract between
library writer and the user.
A dll itself is not a spec, it is the implementation.
If you
Separate hand written specification is rulez for human. It is best
short module description (with some useful manually written comments).
I like it more then autogenerated docs (by doxygen and so on).
Autogenerated specifications (headers and so on) are worst and ugly.
But in language like java
On 11/28/2011 06:07 PM, Maxim Fomin wrote:
In conclusion, I find D module support the worst one.
Sad but true.
On Mon, 28 Nov 2011 18:41:30 +0200, Alexey Veselovsky
alexey.veselov...@gmail.com wrote:
Separate hand written specification is rulez for human. It is best
short module description (with some useful manually written comments).
I like it more then autogenerated docs (by doxygen and so on).
I
Do you think it'd be a good thing to put the .di file in the
generated compiled lib?
That'd be somewhat similar to the c# example.
dmd myprog.d something.dll
searches something.dll for a .di reference, and adds it to the
compile command line if it's there.
On 11/28/2011 09:01 AM, so wrote:
On Mon, 28 Nov 2011 03:44:23 +0200, Walter Bright
newshou...@digitalmars.com wrote:
On 11/27/2011 4:44 PM, Alexey Veselovsky wrote:
D has a true module system that supports separate compilation and
generates and uses module summaries (highbrowspeak for header
On Mon, 28 Nov 2011 19:26:23 +0200, Timon Gehr timon.g...@gmx.ch wrote:
Nobody stops you from hand crafting *.di files.
My point exactly.
2011/11/28 Timon Gehr timon.g...@gmx.ch:
On 11/28/2011 09:01 AM, so wrote:
On Mon, 28 Nov 2011 03:44:23 +0200, Walter Bright
newshou...@digitalmars.com wrote:
On 11/27/2011 4:44 PM, Alexey Veselovsky wrote:
D has a true module system that supports separate compilation and
generates and
On 11/28/2011 05:41 PM, Alexey Veselovsky wrote:
Separate hand written specification is rulez for human. It is best
short module description (with some useful manually written comments).
I like it more then autogenerated docs (by doxygen and so on).
Autogenerated specifications (headers and so
On 11/28/2011 05:07 PM, Maxim Fomin wrote:
2011/11/28 Max Samukhamax...@spambox.com:
On 11/28/2011 02:29 PM, so wrote:
On Mon, 28 Nov 2011 13:58:25 +0200, Max Samukhamax...@spambox.com
wrote:
How would you write libraries?
The way they do, for example, in C# - interface definitions are
On 11/28/2011 06:41 PM, Maxim Fomin wrote:
2011/11/28 Timon Gehrtimon.g...@gmx.ch:
On 11/28/2011 09:01 AM, so wrote:
On Mon, 28 Nov 2011 03:44:23 +0200, Walter Bright
newshou...@digitalmars.com wrote:
On 11/27/2011 4:44 PM, Alexey Veselovsky wrote:
D has a true module system that
so Wrote:
http://cpp-next.com/archive/2011/11/having-it-all-pythy-syntax/
o.O
overload a lambda?
Alexey Veselovsky Wrote:
ok. What about:
struct Foo {
int a;
int b;
// 100 more fields
...
void foo();
}
Did I must write in implementation all this 100+ fields in implementation?
In Ada and Modula there is 2 languages: one for implementation and
another for
On Mon, 28 Nov 2011 21:12:32 +0200, Kagamin s...@here.lot wrote:
In Java separation is done with interfaces. I think it is right.
For Java, yes.
On 11/28/2011 3:41 AM, Alexey Veselovsky wrote:
ok. What about:
struct Foo {
int a;
int b;
// 100 more fields
...
void foo();
}
Did I must write in implementation all this 100+ fields in implementation?
Yes. (Unless you decide to use the PIMPL idiom.)
On 11/28/2011 4:00 AM, Alexey Veselovsky wrote:
ok. I just removed from test.di all non public entities.
// D import file generated from 'test.d'
module test;
public
{
void foo();
struct Boo
{
public
{
void boo();
}
}
}
Now, let's
so Wrote:
On Mon, 28 Nov 2011 21:12:32 +0200, Kagamin s...@here.lot wrote:
In Java separation is done with interfaces. I think it is right.
For Java, yes.
Java, D or C++, classes and structs are not a separation. Want a real
separation? See COM: it doesn't even have notion of a field.
Walter:
On 11/28/2011 4:00 AM, Alexey Veselovsky wrote:
Compiler doesn't know anything about specification files. So, he
did't check specificationimplementation conformance.
Yes, that's correct.
And this is positive because?
See also Timon answer:
bearophile Wrote:
And this is positive because?
You say it as if it's negative.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/28/2011 12:37 PM, Kagamin wrote:
so Wrote:
http://cpp-next.com/archive/2011/11/having-it-all-pythy-syntax/
o.O
overload a lambda?
And now I see what all the hype is about with D's template system.
Good lord. I've never really
Am 28.11.2011, 14:42 Uhr, schrieb Maxim Fomin ma...@maxim-fomin.ru:
2011/11/28 Marco Leise marco.le...@gmx.de:
Am 28.11.2011, 11:02 Uhr, schrieb Jude 10equa...@gmail.com:
I tried to write a lib and a project, which used that lib
separately, but came to conclusion that the best choice it to
, pushing language's capabilities. So, if
someone is annoyed by the limits of C++, that would be them.
Forget everything, i was thinking that the generic capabilities of D alone
is enough to attract all the boost crowd.
Phew, had to get it out.
...).
They are the top C++ developers, pushing language's capabilities. So, if
someone is annoyed by the limits of C++, that would be them.
Forget everything, i was thinking that the generic capabilities of D
alone is enough to attract all the boost crowd.
Phew, had to get it out.
Why switch state
...).
They are the top C++ developers, pushing language's capabilities. So, if
someone is annoyed by the limits of C++, that would be them.
Forget everything, i was thinking that the generic capabilities of D
alone is enough to attract all the boost crowd.
Phew, had to get it out.
The dynamics
I'm trying to switch from C++ to D. But I can't find some things that
I love in C++. For example in C++ I can separate module specification
and implementation. Advertising article The Case for D says that it
is real in D too:
D has a true module system that supports separate compilation and
On 11/27/2011 4:44 PM, Alexey Veselovsky wrote:
D has a true module system that supports separate compilation and
generates and uses module summaries (highbrowspeak for header files)
automatically from source, so you don't need to worry about
maintaining redundant files separately, unless you
On 11/27/2011 9:53 AM, so wrote:
Even Herb Sutter broke his silence and mentioned D here and there,
Herb is a very nice (and very smart) guy, and when I've heard him talk about D
he's been very complimentary about our efforts.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/27/2011 06:44 PM, Alexey Veselovsky wrote:
I'm trying to switch from C++ to D. But I can't find some things
that I love in C++. For example in C++ I can separate module
specification and implementation. Advertising article The Case for
D
WB How is it not true?
J dmd -H [file] -c generates the header file for you quite nicely.
ok. Let's a see:
C++ code.
Specification:
// test.hpp file
#ifndef _test_hpp_
#define _test_hpp_
void foo();
struct Boo
{
public:
void boo();
private:
struct S {};
};
#endif
Implementation:
67 matches
Mail list logo