Walter Bright wrote:
Stewart Gordon wrote:
I'm still none the wiser about why it absolutely has to be done like
this instead of the simpler solution I proposed years ago.
Can you refresh my memory?
Seems straightforward to find to me, but here it is:
Brad Roberts wrote:
* graphing of issue trends
That's a crock g.
Uh, whatever. Most of the rest of us humans respond much better to
pictures and trends than to raw numbers. Show me some visual
indication of the quality of my code (ignoring the arguments about
the validity of such graphs)
Walter Bright wrote:
Brad Roberts wrote:
* graphing of issue trends
That's a crock g.
Uh, whatever. Most of the rest of us humans respond much better to
pictures and trends than to raw numbers. Show me some visual
indication of the quality of my code (ignoring the arguments about
the
Hello Walter,
3) Rule creation. The core engine usually generates some digested
dataset upon rules are evaluated. The systems come with a builtin
set that do the sorts of things already talked about. In addition
they come with the ability to develop new rules specific to your
application and
Hello Walter,
Consider the Bible. It's long and complicated, and by careful
examination of it you can find a verse here and there to justify *any*
behavior.
This is true of any long document if you are willing to string together enough
quotes and ignore enough of it. I'd bet you could get
Walter, is that article publicly available?
Dejan Lekic wrote:
Walter, is that article publicly available?
http://www.codeproject.com/KB/cpp/FastDelegate.aspx
Thanks Don! \o/
On 2009-10-01 23:52:28 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
Michel Fortin wrote:
On 2009-10-01 12:29:39 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
I think it's a good idea, but there should be a way to *override*
static functions.
That has
bearophile Wrote:
Max Samukha:
Don't get confused by 'new' in struct initializers. Structs in C# are
value types.
Yes, you are right.
But in D structs can be allocated on the heap too, so I think having optional
nonnull
struct pointers can be useful. The syntax and usage is
For the interest of newsgroups readers, I dropped in at the Cafe the other day
and
the barista had this to say
http://cafe.elharo.com/programming/imagine-theres-no-null/
Disclaimer: YMMV
Cheers
-- Justin Johansson
On Thu, 01 Oct 2009 22:52:28 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Michel Fortin wrote:
On 2009-10-01 12:29:39 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
I think it's a good idea, but there should be a way to *override*
static functions.
On 2009-10-02 08:29:09 -0400, Max Samukha spam...@d-coding.com said:
class Counted {
mixin(Derived)
{
// Insert here stuff that must be pasted for each subclass
// of Counted (including Counted itself).
// Use Derived as the name of the current subtype of
On Fri, 2 Oct 2009 08:54:49 -0400, Michel Fortin
michel.for...@michelf.com wrote:
On 2009-10-02 08:29:09 -0400, Max Samukha spam...@d-coding.com said:
class Counted {
mixin(Derived)
{
// Insert here stuff that must be pasted for each subclass
// of Counted
Michel Fortin wrote:
If I could attach my class-related data to the ClassInfo of a specific
class (so it could be retrieved at runtime) and if static functions had
access to the classinfo of the class they're called from (practically
making them member function of the corresponding ClassInfo)
On Thu, Oct 1, 2009 at 11:48 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
But.. you mark something abstract when you want it to be .. abstract.
How would you argue that abstract is basically a no-op when used on
methods with bodies?
It's not a no-op. Try it.
Yeah, not
Justin Johansson wrote:
For the interest of newsgroups readers, I dropped in at the Cafe the other day
and
the barista had this to say
http://cafe.elharo.com/programming/imagine-theres-no-null/
Disclaimer: YMMV
Cheers
-- Justin Johansson
Most of the bugs he expose are trivial to debug and
Hi,
Walter Bright wrote:
There's a lot of hoopla about these static checkers, but I'm not
impressed by them based on what I can find out about them. What do you
know about what these checkers do that is not on this list? Any other
kinds of checking that would be great to implement?
The
On Fri, Oct 2, 2009 at 8:13 AM, Justin Johansson n...@spam.com wrote:
For the interest of newsgroups readers, I dropped in at the Cafe the other
day and
the barista had this to say
http://cafe.elharo.com/programming/imagine-theres-no-null/
Disclaimer: YMMV
Cheers
-- Justin Johansson
I
Justin Johansson wrote:
For the interest of newsgroups readers, I dropped in at the Cafe the other day
and
the barista had this to say
http://cafe.elharo.com/programming/imagine-theres-no-null/
Disclaimer: YMMV
Cheers
-- Justin Johansson
This article brings up a very interesting point
Jarrett Billingsley wrote:
On Thu, Oct 1, 2009 at 11:48 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
But.. you mark something abstract when you want it to be .. abstract.
How would you argue that abstract is basically a no-op when used on
methods with bodies?
It's not a no-op.
On 02/10/2009 16:16, Jeremie Pelletier wrote:
Justin Johansson wrote:
For the interest of newsgroups readers, I dropped in at the Cafe the
other day and
the barista had this to say
http://cafe.elharo.com/programming/imagine-theres-no-null/
Disclaimer: YMMV
Cheers
-- Justin Johansson
Most
I think this has been discussed in this group already.
An object storing another object needs two allocations:
class A { ... }
class B {
A a;
this() {
a = new A;
}
}
auto b = new B; // two allocations
I'm thinking of using scope in this situation to imply in-situ storage:
On Fri, Oct 2, 2009 at 8:33 AM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I think this has been discussed in this group already.
An object storing another object needs two allocations:
class A { ... }
class B {
A a;
this() {
a = new A;
}
}
auto b = new B; //
Andrei Alexandrescu wrote:
I think this has been discussed in this group already.
*Think*?!
http://www.digitalmars.com/d/archives/digitalmars/D/scope_inline_optimizations_scoped_attributes_95025.html
http://www.digitalmars.com/d/archives/digitalmars/D/D2_s_feature_set_91823.html
Andrei Alexandrescu:
class B {
scope A a;
this() {
a = new A;
}
}
Now the A member actually lies inside of B - no more indirection. That
means the constructor needs special scrutiny, in particular a cannot be
null because that wouldn't make much sense.
What do you
Bill Baxter wrote:
On Fri, Oct 2, 2009 at 8:33 AM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I think this has been discussed in this group already.
An object storing another object needs two allocations:
class A { ... }
class B {
A a;
this() {
a = new A;
}
}
auto b
Bill Baxter:
Or it could use placement
construction if you assign a new A to it. (but not if you say
someB.a = new DerivedFromA()).
I hope Andrei's book will explain how (and where) to use placement construction
for classes in D.
Bye,
bearophile
simon Wrote:
Was just wondering if there were plans to create a Snow Leopard build of D
2.0?
After reading this I thought D2.0 and D1.0 isnt working at all on 10.6.
But in fact compiling a testprog in D1.0 worked out of the box while D2.0 gives
me segfault.
Is D2 supposed to be working at
On Thu, 01 Oct 2009 13:53:46 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Jarrett Billingsley wrote:
On Thu, Oct 1, 2009 at 12:25 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
[code injection]
What do you think?
I think it sounds interesting enough, but
On Thu, 01 Oct 2009 16:30:43 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the
On 2-10-2009 8:32, Lionello Lunesu wrote:
On 2-10-2009 4:30, Andrei Alexandrescu wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the compiler disallows
Fri, 02 Oct 2009 10:16:05 -0400, Jeremie Pelletier thusly wrote:
I expect my $3k computer to not slow down to a crawl
because its software is written in a safe way and I like people with
older computers to still be able to run my programs without waiting 5
minutes between any two mouse
Fri, 02 Oct 2009 10:30:24 -0400, Jarrett Billingsley thusly wrote:
I always think it's funny when people are like so, I had this idea,
lemme throw this out there. I know it sounds weird, but just bear with
me - what if there were _no null_? Did I just _blow your mind?_
And the perspective
On Fri, Oct 2, 2009 at 11:00 AM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
No. I think it would help going back to my original message instead of
asking one-liner questions. This would work much better in real life, but
it's a time sink in a newsgroup. You spend five seconds on
I was just playing with some nested classes:
class Base {
int x;
}
class A {
private int x, y;
class B : Base {
int z;
this() {
x = 42;
y = 43;
this.outer.x = 44;
z = 45;
}
}
}
In the code above, if you
Andrei Alexandrescu wrote:
I think this has been discussed in this group already.
An object storing another object needs two allocations:
class A { ... }
class B {
A a;
this() {
a = new A;
}
}
auto b = new B; // two allocations
I'm thinking of using scope in this situation to
Jarrett Billingsley wrote:
On Fri, Oct 2, 2009 at 11:00 AM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
No. I think it would help going back to my original message instead of
asking one-liner questions. This would work much better in real life, but
it's a time sink in a newsgroup.
Tom S wrote:
I think it should be done in userland, not built-in. Here's a
proof-of-concept implementation:
[awesome code snipped]
I am struck with awe. Thanks.
Andrei
Tom S wrote:
I think it should be done in userland, not built-in. Here's a
proof-of-concept implementation:
[awesome code snipped]
I am struck with awe. Thanks.
Andrei
language_fan wrote:
Fri, 02 Oct 2009 10:30:24 -0400, Jarrett Billingsley thusly wrote:
I always think it's funny when people are like so, I had this idea,
lemme throw this out there. I know it sounds weird, but just bear with
me - what if there were _no null_? Did I just _blow your mind?_
And
On Fri, Oct 2, 2009 at 1:34 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
It was a question, you one-liner-asker you.
What?
;)
Walter Bright wrote:
Nick Sabalausky wrote:
Walter Bright newshou...@digitalmars.com wrote in message
2. possible dereference of NULL pointers (some reaching definitions
of a pointer are NULL)
2. Optimizer collects the info, but ignores this, because people are
annoyed by false positives.
Fri, 02 Oct 2009 12:38:33 -0500, Andrei Alexandrescu thusly wrote:
I'll note two things. For one, Walter is a heck more progressive than
his pedigree might lead one to think. He has taken quite some risks with
a number of features that made definite steps outside the mainstream,
and I feel he
I just realized that nested classes work so well with alias this, you'd
think it was an evil plot all along. It wasn't, but I'm happy about the
coincidence.
Here's how to effect multiple subtyping in D very effectively:
import std.stdio;
class Base1 {
void fun() { writeln(Base.fun); }
}
Fri, 02 Oct 2009 13:00:05 -0500, Andrei Alexandrescu thusly wrote:
I just realized that nested classes work so well with alias this, you'd
think it was an evil plot all along. It wasn't, but I'm happy about the
coincidence.
Here's how to effect multiple subtyping in D very effectively:
Andrei Alexandrescu:
Disallowing hiding vertically in nested scopes has been quite
successful. Also, D's no-hijack stance is also shaping up to be a hit. I
am therefore thinking - why not apply the no-hijack rule throughout the
language?
I agree that making D tidier in such regards is
language_fan wrote:
Fri, 02 Oct 2009 13:00:05 -0500, Andrei Alexandrescu thusly wrote:
I just realized that nested classes work so well with alias this, you'd
think it was an evil plot all along. It wasn't, but I'm happy about the
coincidence.
Here's how to effect multiple subtyping in D very
On Fri, 02 Oct 2009 13:00:05 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I just realized that nested classes work so well with alias this, you'd
think it was an evil plot all along. It wasn't, but I'm happy about the
coincidence.
Here's how to effect multiple subtyping in D
On Fri, 02 Oct 2009 21:41:54 +0300, Max Samukha spam...@d-coding.com
wrote:
Note that there is an additional level of indirection per each
subtype:
subtype = subtyped type
http://www.reddit.com/r/programming/comments/9q52z/member_function_pointers_and_the_fastest_possible/
Max Samukha wrote:
On Fri, 02 Oct 2009 13:00:05 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I just realized that nested classes work so well with alias this, you'd
think it was an evil plot all along. It wasn't, but I'm happy about the
coincidence.
Here's how to effect
Andrei Alexandrescu:
I'm thinking of using scope in this situation to imply in-situ storage:
It may be good for the compiler to show a warning (that explains exactly why)
where the compiler can't scope a class marked as scope (both in a function or
in a method).
Bye,
bearophile
Andrei Alexandrescu Wrote:
Disallowing hiding vertically in nested scopes has been quite
successful. Also, D's no-hijack stance is also shaping up to be a hit. I
am therefore thinking - why not apply the no-hijack rule throughout the
language?
If one symbol leads to working code
Andrei Alexandrescu wrote:
Christopher Wright wrote:
Andrei Alexandrescu wrote:
I am becoming increasingly aware that we need to provide some means
to define certain members (data and functions) for each class as if
they were pasted there.
Most of the examples given would be well served by
BCS wrote:
Hello Walter,
Consider the Bible. It's long and complicated, and by careful
examination of it you can find a verse here and there to justify *any*
behavior.
This is true of any long document if you are willing to string together
enough quotes and ignore enough of it. I'd bet you
Rainer Schuetze wrote:
I've run the analysis on the dmd source code, but deactivated some
warnings regarding memory leaks and variable hiding to not get flooded
with messages. After that, code analysis added about 150 warnings to the
1000 already issued by the compiler (mostly signed/unsigned
(after a small discussion on IRC) Tuples may be used for similar purposes, but
fixed-sized arrays are simpler to use, simpler to define, and they don't induce
compilation/code bloat. Is this a good idea?
int foo(int[3] arr)() {
return arr[1];
}
const int[3] a = [10, 20, 30];
void main() {
Bill Baxter wbax...@gmail.com wrote in message
news:mailman.122.1254431062.20261.digitalmar...@puremagic.com...
Probably more like
Foo f;
createAndSetOutParam(f);
f.bar();
or
Foo f;
if (a 10) { f = new Foo(10); }
...
if (a 10) {
f.bar();
}
How does C# handle the cases above?
Just did
Andrei Alexandrescu, el 2 de octubre a las 13:00 me escribiste:
I just realized that nested classes work so well with alias this,
you'd think it was an evil plot all along. It wasn't, but I'm happy
about the coincidence.
Here's how to effect multiple subtyping in D very effectively:
Andrei Alexandrescu Wrote:
Jarrett Billingsley wrote:
On Thu, Oct 1, 2009 at 4:30 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires
Fri, 02 Oct 2009 16:56:48 -0400, bearophile thusly wrote:
A good purpose for compile-time functions is to pre-generate constant
data structures, avoiding to waste time generating them at compile time.
But currently creating fixed-sized arrays at compile time while possible
is tricky (it's
Fri, 02 Oct 2009 19:35:55 -0300, Leandro Lucarella thusly wrote:
We might have very different taste, but I find that a little...
horrible. What do you have against mixins? I think you're trying to use
D as C++ :)
So basically the diamond problem is again implementable in D, yay?
bearophile wrote:
(after a small discussion on IRC) Tuples may be used for similar purposes, but
fixed-sized arrays are simpler to use, simpler to define, and they don't induce
compilation/code bloat. (...)
What do you mean by that? So parametrizing a template with a static
array would
Leandro Lucarella wrote:
We might have very different taste, but I find that a little... horrible.
What do you have against mixins? I think you're trying to use D as C++ :)
If mixins work better, all the better. How would you use them to achieve
multiple inheritance?
Andrei
language_fan:
Note
that if the data structures are small, generating them takes very little
time on modern 32/64-bit hardware. OTOH if you have tens of megabytes of
binary data in your .exe, hard drives are a serious bottleneck.
You forget an important thing: If you generate things at
language_fan wrote:
Fri, 02 Oct 2009 19:35:55 -0300, Leandro Lucarella thusly wrote:
We might have very different taste, but I find that a little...
horrible. What do you have against mixins? I think you're trying to use
D as C++ :)
So basically the diamond problem is again implementable
Saaa wrote:
Jeremie Pelletier wrote
Saaa wrote:
I think is very bug-prone, isn't it obvious iub should be -5?
ubyte ub = 5;
int iub = -ub; // iub now is 251
What is the reasoning to do it this way?
Minus toggles the most significant bit, be it on a signed or unsigned
type. When converting
Testing 1, 2, 3, testing
Jeremie Pelletier wrote:
Don wrote:
Saaa wrote:
Jeremie Pelletier wrote
Saaa wrote:
I think is very bug-prone, isn't it obvious iub should be -5?
ubyte ub = 5;
int iub = -ub; // iub now is 251
What is the reasoning to do it this way?
Minus toggles the most significant bit, be it on a
Brad Roberts wrote:
On Thu, 1 Oct 2009, Saaa wrote:
I think is very bug-prone, isn't it obvious iub should be -5?
ubyte ub = 5;
int iub = -ub; // iub now is 251
What is the reasoning to do it this way?
The inclusion of the 'int' part obscures what I think the real problem
is..
Does
On Fri, 02 Oct 2009 16:25:01 +0200, Don wrote:
Brad Roberts wrote:
On Thu, 1 Oct 2009, Saaa wrote:
I think is very bug-prone, isn't it obvious iub should be -5?
ubyte ub = 5;
int iub = -ub; // iub now is 251
What is the reasoning to do it this way?
The inclusion of the 'int' part
Moritz Warning wrote:
snip
ubyte z = 5;
int x = -z; // x now is 251
int y = -1 * z; // y is now -5
Indeed, I've just looked at the spec, and it appears that the promotion
of all smaller integer types to int/uint applies only to binary
operations. Why?
It even arguably breaks the looks
Phil Deets Wrote:
Is there a Windows IDE with support for D2 debugging,
building,
The Zeus IDE can be easily configured to run the D compiler
or any of the build tools:
http://www.zeusedit.com/forum/viewtopic.php?t=2465
and basic code navigation (such as go to definition)?
Zeus comes
Stewart Gordon wrote:
snip
#include stdio.h
int main() {
unsigned char z = 5;
int x = -z; // x now is 251
snip
Needless to say, this comment is a mistake.
Stewart.
http://d.puremagic.com/issues/show_bug.cgi?id=3359
Summary: Cannot parse pure/const/immutable functions with
inferred return type
Product: D
Version: 2.031
Platform: All
OS/Version: All
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=3356
--- Comment #3 from Don clugd...@yahoo.com.au 2009-10-02 08:03:51 PDT ---
(In reply to comment #2)
(In reply to comment #1)
(In reply to comment #0)
2. When a function takes a reference type parameter, the chanses are
slim, that
http://d.puremagic.com/issues/show_bug.cgi?id=3361
Summary: code in std.zlib concatenates void[] arrays
Product: D
Version: 1.045
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P2
78 matches
Mail list logo