Re: C++, D: Dinosaurs?

2008-11-14 Thread superdan
Nick Sabalausky Wrote: > "Tony" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > "Walter Bright" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > >> > >> 1. GC programs can be faster > >> > >> 2. GC programs can use less memory > >> > >> 3. GC programs can b

Re: C++, D: Dinosaurs?

2008-11-14 Thread Walter Bright
Tony wrote: That's why I think GC should be an opt-in rather than an opt-out choice. That's a key characteristic of C++: opt-in. And I really, really like that level of creative freedom. I've used a GC with C++ (both the Boehm one and one I wrote myself). The idea that GC is opt-in in C++ is

Re: D

2008-11-14 Thread Jarrett Billingsley
On Sat, Nov 15, 2008 at 12:35 AM, Tony <[EMAIL PROTECTED]> wrote: Before I begin, know that the things I'm saying here are not meant as attacks. It's just that your post has a rambling, semi-off-topic feel to it and so I'll do the same ;) > When I went to college, there was a BIG push to indoctr

Re: Struct member alignment for external data formats??

2008-11-14 Thread Jarrett Billingsley
On Fri, Nov 14, 2008 at 11:28 PM, Tony <[EMAIL PROTECTED]> wrote: > > "Kagamin" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Tony Wrote: >> >>> I'm reading a very old feature list of D and it says that D has struct >>> member alignment control "to ensure compatibility with exter

Re: C++, D: Dinosaurs?

2008-11-14 Thread Nick Sabalausky
"Tony" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Walter Bright" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> 1. GC programs can be faster >> >> 2. GC programs can use less memory >> >> 3. GC programs can be guaranteed to be memory safe >> >> 4. GC pro

D

2008-11-14 Thread Tony
Reading the D feature list and "value propositions", I find much to my own way of thinking (and wonder if any of my own issues found there way into D's requirement list) as to what would be a great language. Right now, I'm not developing software. Well OK, I am, but not "real" software: I am dev

Re: C++, D: Dinosaurs?

2008-11-14 Thread Tony
"Walter Bright" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tony wrote: >> Please clarify for me the mem mgmt of D: is the garbage collector >> optional or not? Just allowing me to replace "getmorecore()" or something >> like that and then having the collector on top of that i

Re: exe file size

2008-11-14 Thread John Reimer
Hello TomD, John Reimer Wrote: [...] My quickfix: - Snip #!/bin/bash # makemaker: create a Makefile in every subdir that contains # .d files. # Use like this: # makemaker > all.mak # and set up DC, DCSYSFLAGS, DCFLAGS, OBJEXT in the top # Makefile for d in `find $1 -type d`; do cd $d ls

Re: exe file size

2008-11-14 Thread John Reimer
Hello Andrei, Bill Baxter wrote: On Fri, Nov 14, 2008 at 3:55 PM, John Reimer <[EMAIL PROTECTED]> wrote: Hello Bill, I think the build time of dwt apps is a much bigger issue right now than the size of exes. The size of exes can be reduced using hacks like upx, but there is no fix for the

Re: Struct member alignment for external data formats??

2008-11-14 Thread Tony
"Kagamin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tony Wrote: > >> I'm reading a very old feature list of D and it says that D has struct >> member alignment control "to ensure compatibility with externally imposed >> data formats". So, questions: 1. How does one use that? >

Re: flagging runtime null dereferencing

2008-11-14 Thread Robert Fraser
Chad J wrote: Hell, just the naive version of inserting assert( c !is null, ... ); before dereferences would be extremely awesome. I've already spent too much of my life on this crap. Yup, yup; agreed. Thankfully, Windows raises a structured exception for an AV, and using the Team0xf backtra

Re: exe file size RDMD

2008-11-14 Thread Andrei Alexandrescu
BLS wrote: Andrei Alexandrescu Wrote: Bill Baxter wrote: On Fri, Nov 14, 2008 at 3:55 PM, John Reimer <[EMAIL PROTECTED]> wrote: Hello Bill, I think the build time of dwt apps is a much bigger issue right now than the size of exes. The size of exes can be reduced using hacks like upx, but

StackOverflow: Applications development with D language

2008-11-14 Thread Julio César Carrascal Urquijo
There's an unanswered question on Stack Overflow about D. Anyone cares to write a response? http://stackoverflow.com/questions/289087/applications-development-with-d-language """ For those who had developed applications with D, * which libraries did you use to build your application? * t

Re: flagging runtime null dereferencing

2008-11-14 Thread Chad J
Steven Schveighoffer wrote: I know this has been brought up many times, but I think possibly the usefulness of this feature has been underestimated, and its cost overestimated. Consider several points: 1. check for null needs to be done only when the source of the variable is unknown. 2. seg

Re: exe file size

2008-11-14 Thread John Reimer
Hello Jarrett, On Fri, Nov 14, 2008 at 10:46 AM, Jeffrey Rennie <[EMAIL PROTECTED]> wrote: John Reimer wrote: Hello Bill, I think the build time of dwt apps is a much bigger issue right now than the size of exes. The size of exes can be reduced using hacks like upx, but there is no fix fo

Re: enumerating member offsetofs via foreach over members-tuple

2008-11-14 Thread Denis Koroskin
15.11.08 в 01:47 Frits van Bommel в своём письме писал(а): Denis Koroskin wrote: Am I doing something wrong? As was mentioned, 'm' is just a local variable once inside the loop. This works though: - foreach (i, m; this.tupleof) { writefln(this.tupleof[i].offsetof); } - Ah, y

Re: enumerating member offsetofs via foreach over members-tuple

2008-11-14 Thread Denis Koroskin
15.11.08 в 00:30 Steven Schveighoffer в своём письме писал(а): "Denis Koroskin" wrote I'm doing some meta stuff and came across a few problems. First of is described here: http://d.puremagic.com/issues/show_bug.cgi?id=2454 Bug reports without actual errors listed in them (i.e. 'try this and

Re: The Next Big Language

2008-11-14 Thread Alexander Pánek
Jarrett Billingsley wrote: On Fri, Nov 14, 2008 at 4:57 PM, Julio César Carrascal Urquijo <[EMAIL PROTECTED]> wrote: Hello Julio César, ECMAScript 2 ECMAScript 4 I was typing up a snarky comment at the same time you posted this ;) How dare you being snarky!

Re: flagging runtime null dereferencing

2008-11-14 Thread Nick Sabalausky
"Steven Schveighoffer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In addition, I'd propose that the compiler does a static check to see if a > null dereference definitely will happen. e.g: > > C c; > c.method(); // should be a compile error. > > Ran into this again, and again,

Re: enumerating member offsetofs via foreach over members-tuple

2008-11-14 Thread Frits van Bommel
Denis Koroskin wrote: Am I doing something wrong? As was mentioned, 'm' is just a local variable once inside the loop. This works though: - foreach (i, m; this.tupleof) { writefln(this.tupleof[i].offsetof); } -

Re: flagging runtime null dereferencing

2008-11-14 Thread Sean Kelly
Steven Schveighoffer wrote: 4. Yes, segfault is a loud error, but it's like hearing a gunshot from under water. It's loud, but you have no idea where it's coming from, or whether a null dereference is to blame. An assert is much more useful because it tells you the line of code that fails.

flagging runtime null dereferencing

2008-11-14 Thread Steven Schveighoffer
I know this has been brought up many times, but I think possibly the usefulness of this feature has been underestimated, and its cost overestimated. Consider several points: 1. check for null needs to be done only when the source of the variable is unknown. 2. segfaults can come from other sou

Re: The Next Big Language

2008-11-14 Thread Bill Baxter
On Sat, Nov 15, 2008 at 6:48 AM, Julio César Carrascal Urquijo <[EMAIL PROTECTED]> wrote: > Hello Alexander, > >> Julio César Carrascal Urquijo wrote: >> >>> Steve Yegge's latest article has a ratter nice quote about D: >>> >>> http://steve-yegge.blogspot.com/2007/02/next-big-language.html >>> >>>

Re: The Next Big Language

2008-11-14 Thread Jarrett Billingsley
On Fri, Nov 14, 2008 at 4:57 PM, Julio César Carrascal Urquijo <[EMAIL PROTECTED]> wrote: > Hello Julio César, > >> ECMAScript 2 >> > > ECMAScript 4 I was typing up a snarky comment at the same time you posted this ;)

Re: exe file size RDMD

2008-11-14 Thread BLS
Andrei Alexandrescu Wrote: > Bill Baxter wrote: > > On Fri, Nov 14, 2008 at 3:55 PM, John Reimer <[EMAIL PROTECTED]> wrote: > >> Hello Bill, > >> > >> > >>> I think the build time of dwt apps is a much bigger issue right now > >>> than the size of exes. The size of exes can be reduced using hacks

Re: The Next Big Language

2008-11-14 Thread Julio César Carrascal Urquijo
Hello Julio César, ECMAScript 2 ECMAScript 4

Re: The Next Big Language

2008-11-14 Thread Julio César Carrascal Urquijo
Hello Alexander, Julio César Carrascal Urquijo wrote: Steve Yegge's latest article has a ratter nice quote about D: http://steve-yegge.blogspot.com/2007/02/next-big-language.html "D's a really beautiful language. By rights it should be the next C++. However, C++ programmers won't have it bec

Re: The Next Big Language

2008-11-14 Thread Alexander Pánek
Julio César Carrascal Urquijo wrote: Steve Yegge's latest article has a ratter nice quote about D: http://steve-yegge.blogspot.com/2007/02/next-big-language.html "D's a really beautiful language. By rights it should be the next C++. However, C++ programmers won't have it because it's garbage c

Re: class.sizeof

2008-11-14 Thread Sean Kelly
Jarrett Billingsley wrote: On Fri, Nov 14, 2008 at 2:35 PM, Sean Kelly <[EMAIL PROTECTED]> wrote: I added an "isizeof" proposal to the issue tracker maybe two years ago. Feel free to vote it up if you'd like. But W will say "it's already accessible through __traits." Not to sound fatalistic

Re: enumerating member offsetofs via foreach over members-tuple

2008-11-14 Thread Steven Schveighoffer
"Denis Koroskin" wrote > I'm doing some meta stuff and came across a few problems. > > First of is described here: > http://d.puremagic.com/issues/show_bug.cgi?id=2454 Bug reports without actual errors listed in them (i.e. 'try this and see what happens') will probably be ignored. It would do y

Re: enumerating member offsetofs via foreach over members-tuple

2008-11-14 Thread bearophile
Denis Koroskin: > First of is described here: > http://d.puremagic.com/issues/show_bug.cgi?id=2454 Just a note, the result is correct if you replace this line: writefln(typeof(m).stringof); With: writefln(typeid(typeof(m))); Bye, bearophile

The Next Big Language

2008-11-14 Thread Julio César Carrascal Urquijo
Steve Yegge's latest article has a ratter nice quote about D: http://steve-yegge.blogspot.com/2007/02/next-big-language.html "D's a really beautiful language. By rights it should be the next C++. However, C++ programmers won't have it because it's garbage collected (even though it can be disab

Re: enumerating member offsetofs via foreach over members-tuple

2008-11-14 Thread Denis Koroskin
On Fri, 14 Nov 2008 23:55:08 +0300, Denis Koroskin <[EMAIL PROTECTED]> wrote: I'm doing some meta stuff and came across a few problems. First of is described here: http://d.puremagic.com/issues/show_bug.cgi?id=2454 Second one is slightly different and this time I am less sure whether it

Re: enumerating member offsetofs via foreach over members-tuple

2008-11-14 Thread Denis Koroskin
On Fri, 14 Nov 2008 23:55:08 +0300, Denis Koroskin <[EMAIL PROTECTED]> wrote: I'm doing some meta stuff and came across a few problems. First of is described here: http://d.puremagic.com/issues/show_bug.cgi?id=2454 Second one is slightly different and this time I am less sure whether it

enumerating member offsetofs via foreach over members-tuple

2008-11-14 Thread Denis Koroskin
I'm doing some meta stuff and came across a few problems. First of is described here: http://d.puremagic.com/issues/show_bug.cgi?id=2454 Second one is slightly different and this time I am less sure whether it is a bug. The following code is indetended to print offsets of all its members:

Forward declarations of template specilizations.

2008-11-14 Thread Ryan Bloomfield
I have an interesting issue, that makes me curious on how D handles it. consider the following: == module List; template NodeTraits(NodeType) { static NodeType getNext(NodeType v) { return v.next; } } class List(NodeType, Traits=NodeTraits!(NodeType)) { privat

Re: class.sizeof

2008-11-14 Thread bearophile
Jarrett Billingsley: > But W will say "it's already accessible through __traits." Not to > sound fatalistic, but do you honestly think this would be added to D1? Generally I think that having a fully frozen language (D1), that can't accept improvements, is bad. And I think that in an open source

Re: class.sizeof

2008-11-14 Thread Tim M
A few years too late to by why isn't all classes objects, an instance of a special virtual class called Class. On Sat, 15 Nov 2008 08:55:29 +1300, Jarrett Billingsley <[EMAIL PROTECTED]> wrote: On Fri, Nov 14, 2008 at 2:35 PM, Sean Kelly <[EMAIL PROTECTED]> wrote: Tomas Lindquist Olsen w

Re: class.sizeof

2008-11-14 Thread Jarrett Billingsley
On Fri, Nov 14, 2008 at 2:35 PM, Sean Kelly <[EMAIL PROTECTED]> wrote: > Tomas Lindquist Olsen wrote: >> >> Denis Koroskin wrote: >>> >>> I can't find a way to get a class sizeof property - it returns 4 (32bit >>> pointer size) always. I tried many ways but still can't figure out how to do >>> this

Re: class.sizeof

2008-11-14 Thread Sean Kelly
Tomas Lindquist Olsen wrote: Denis Koroskin wrote: I can't find a way to get a class sizeof property - it returns 4 (32bit pointer size) always. I tried many ways but still can't figure out how to do this. Documentation says that ".sizeof applied to a class object returns the size of the clas

Re: class.sizeof

2008-11-14 Thread Denis Koroskin
On Fri, 14 Nov 2008 21:06:39 +0300, Tomas Lindquist Olsen <[EMAIL PROTECTED]> wrote: Denis Koroskin wrote: I can't find a way to get a class sizeof property - it returns 4 (32bit pointer size) always. I tried many ways but still can't figure out how to do this. Documentation says that ".s

Re: class.sizeof

2008-11-14 Thread Tomas Lindquist Olsen
Denis Koroskin wrote: I can't find a way to get a class sizeof property - it returns 4 (32bit pointer size) always. I tried many ways but still can't figure out how to do this. Documentation says that ".sizeof applied to a class object returns the size of the class reference, not the class in

class.sizeof

2008-11-14 Thread Denis Koroskin
I can't find a way to get a class sizeof property - it returns 4 (32bit pointer size) always. I tried many ways but still can't figure out how to do this. Documentation says that ".sizeof applied to a class object returns the size of the class reference, not the class instantiation." Is i

Re: exe file size

2008-11-14 Thread Frank Benoit
Kagamin schrieb: > Jarrett Billingsley Wrote: > >> On Thu, Nov 13, 2008 at 10:41 PM, huurd <[EMAIL PROTECTED]> wrote: >>> the disassemble file is a lot repeat like "ADD [EAX],AL"; >>> >> That's just 0s. > > Hmm... Are they 4kb-long, I wonder? What does that mean? Are those stuffed space that get

Re: Stack-allocated arrays

2008-11-14 Thread Tom S
Andrei Alexandrescu wrote: enum Uninitialized { yeahIKnow } Hahaha, brilliant! :D Is there interest for such a thing? Yes, absolutely. I use lots of stack allocations and the vision of an overflow is always lurking somewhere in the shadows... EASTL has a stack allocator, so we must have

Re: exe file size

2008-11-14 Thread Jarrett Billingsley
On Fri, Nov 14, 2008 at 10:46 AM, Jeffrey Rennie <[EMAIL PROTECTED]> wrote: > John Reimer wrote: >> >> Hello Bill, >> >> >>> I think the build time of dwt apps is a much bigger issue right now >>> than the size of exes. The size of exes can be reduced using hacks >>> like upx, but there is no fix

Re: Escape analysis (full scope analysis proposal)

2008-11-14 Thread Andrei Alexandrescu
Just to fix a little misunderstanding: Michel Fortin wrote: On 2008-11-13 00:53:50 -0500, Andrei Alexandrescu with me for a minute. I'm doing so for the following reasons: (a) I'm essentially writing this post in negative time; By this I meant I don't have time (t < 0), not that I was writing

Re: Some people to convert jdo2.2 to d ?

2008-11-14 Thread dolive
dolive дµ½: > Some people to convert jdo2.2 for rdbms to d ? > > http://www.datanucleus.org/ > http://www.datanucleus.org/products/accessplatform_1_1/index.html If the ORM too cumbersome, the convert an ADO.NET or VCL's dbx to d also

Re: exe file size

2008-11-14 Thread Jeffrey Rennie
John Reimer wrote: Hello Bill, I think the build time of dwt apps is a much bigger issue right now than the size of exes. The size of exes can be reduced using hacks like upx, but there is no fix for the long build times as far as I know. --bb Totally agree. The size is just an annoyanc

Re: This is not just a question.

2008-11-14 Thread mgen
I'm sorry but a private import is not a private module. A private import is seen as private by external modules and as such cannot be accessed. Also the import would be meaningless if it changed the access privileges of any module since by your logic public import would change private functions

Re: Struct member alignment for external data formats??

2008-11-14 Thread Kagamin
Tony Wrote: > I'm reading a very old feature list of D and it says that D has struct > member alignment control "to ensure compatibility with externally imposed > data formats". So, questions: 1. How does one use that? align attribute > 2. Is it accepted > practice in D programming to write/r

Re: How much time will D1 be around?

2008-11-14 Thread Frits van Bommel
Frits van Bommel wrote: Ary Borenszweig wrote: Frits van Bommel escribió: Ary Borenszweig wrote: Now that D2 is being developed, I don't know how much time it will take until it is finished. Once it is, what will happen to D1? Will anyone still use it? I think I might keep using it for a wh

Re: Escape analysis (full scope analysis proposal)

2008-11-14 Thread Michel Fortin
On 2008-11-13 00:53:50 -0500, Andrei Alexandrescu <[EMAIL PROTECTED]> said: Michel Fortin wrote: Everywhere I said there was no need for named regions, I also said named regions could be kept to ease the syntax. That said, I'm not so sure named regions are that good at simplifying the syntax.

Re: Escape analysis (full scope analysis proposal)

2008-11-14 Thread Michel Fortin
On 2008-11-09 08:59:18 -0500, Christopher Wright <[EMAIL PROTECTED]> said: Michel Fortin wrote: I don't see a problem at all. The compiler would expand the lifetime of x to the outer scope, and do the same for y. Basically, the compiler would make it this way in the compiled code: int *

Re: exe file size

2008-11-14 Thread yidabu
On Fri, 14 Nov 2008 02:14:23 + (UTC) John Reimer <[EMAIL PROTECTED]> wrote: > Hello huurd, > > > I use dwt+dwtx, a hello word exe size is 22M, after I use upx the size > > is 800kb. > > > > exe file appears to be a lot of meaningless repeat, how to remove it? > > > > > 22M is distastefull

Re: This is not just a question.

2008-11-14 Thread Yonggang Luo
//-- //start file A.d module A; public class Base{} public void baseFunction{} //end file A.d //-- //- //start file B.d module B; private import A; public void FunctionB(Base x); //at least this is illegal. Because ... public Base FunctionElse(); /*This is als

Re: How much time will D1 be around?

2008-11-14 Thread Frits van Bommel
Ary Borenszweig wrote: Frits van Bommel escribió: Ary Borenszweig wrote: Now that D2 is being developed, I don't know how much time it will take until it is finished. Once it is, what will happen to D1? Will anyone still use it? I think I might keep using it for a while yet. D2 has some feat

Re: Is d support for extern (D) void core.rt.FunctionA(ParameterList);

2008-11-14 Thread Yonggang Luo
Kagamin Wrote: > Yonggang Luo Wrote: > > > I means to support for this, because of this, then we can hidden something > > that we don't want to see. > > > > When you just want to see that API, and not the detail implement. > > And also it can reduce the redundant thinking about what does this m

Struct member alignment for external data formats??

2008-11-14 Thread Tony
I'm reading a very old feature list of D and it says that D has struct member alignment control "to ensure compatibility with externally imposed data formats". So, questions: 1. How does one use that? 2. Is it accepted practice in D programming to write/read structs to/fro, say a disk file, wit

Re: exe file size

2008-11-14 Thread TomD
John Reimer Wrote: [...] My quickfix: - Snip #!/bin/bash # makemaker: create a Makefile in every subdir that contains # .d files. # Use like this: # makemaker > all.mak # and set up DC, DCSYSFLAGS, DCFLAGS, OBJEXT in the top # Makefile for d in `find $1 -type d`; do cd $d ls *.d >/

Re: exe file size

2008-11-14 Thread Max Samukha
On Fri, 14 Nov 2008 02:04:55 -0600, Andrei Alexandrescu <[EMAIL PROTECTED]> wrote: >Bill Baxter wrote: >> On Fri, Nov 14, 2008 at 3:55 PM, John Reimer <[EMAIL PROTECTED]> wrote: >>> Hello Bill, >>> >>> I think the build time of dwt apps is a much bigger issue right now than the size of e

Re: Db access design - call for comments (& help)

2008-11-14 Thread Lars Ivar Igesund
Marcin Kuszczak wrote:. > If you or someone else wanted to help in such a framework (I will use > probably BSD license) I will put code somewhere, so it will be possible > to work on it together. In such a case please drop me an email. First > thing to do is to rethink architecture and found even

Re: exe file size

2008-11-14 Thread Kagamin
Jarrett Billingsley Wrote: > On Thu, Nov 13, 2008 at 10:41 PM, huurd <[EMAIL PROTECTED]> wrote: > > the disassemble file is a lot repeat like "ADD [EAX],AL"; > > > > That's just 0s. Hmm... Are they 4kb-long, I wonder?

Re: Db access design - call for comments (& help)

2008-11-14 Thread Aarti_pl
Christopher Wright pisze: Marcin Kuszczak wrote: ... My db access layer solves above problems. You have me drooling in anticipation. Well, this solution works and really solves above mentioned problems for me. I use it with real application and it works great. But indeed it really might b

Re: exe file size

2008-11-14 Thread John Reimer
Hello Bill, On Fri, Nov 14, 2008 at 3:55 PM, John Reimer <[EMAIL PROTECTED]> wrote: Hello Bill, I think the build time of dwt apps is a much bigger issue right now than the size of exes. The size of exes can be reduced using hacks like upx, but there is no fix for the long build times as fa

Re: exe file size

2008-11-14 Thread Andrei Alexandrescu
Bill Baxter wrote: On Fri, Nov 14, 2008 at 3:55 PM, John Reimer <[EMAIL PROTECTED]> wrote: Hello Bill, I think the build time of dwt apps is a much bigger issue right now than the size of exes. The size of exes can be reduced using hacks like upx, but there is no fix for the long build times