Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread bearophile
Jarrett Billingsley Wrote: > Bahahaha, oh comma exps. Their usage will need to be quite regulated in D (using them for smarter purposes is a cute idea, but it may impair C compatibility). Bye, bearophile

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Jarrett Billingsley
On Thu, Oct 8, 2009 at 10:05 PM, Christopher Wright wrote: > Justin Johansson wrote: >> >> Jarrett Billingsley Wrote: >> >>> On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: I almost have to apologize for this question but .. How does one initialize a static rectangular

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Ellery Newcomer
Justin Johansson wrote: > Jarrett Billingsley Wrote: > >> On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: > > Thanks Jarrett. > > Am I having a blonde day? > >int[2,3] m = [ 1, 2, 3 ]; >writefln( "m=%s, .sizeof=%d", m, m.sizeof); > > Compiles and prints: > > m=[1,2,3], .size

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Christopher Wright
Justin Johansson wrote: Jarrett Billingsley Wrote: On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: I almost have to apologize for this question but .. How does one initialize a static rectangular array (2-d matrix) in D1? None of the following or other variations that I've tried com

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Justin Johansson
Jarrett Billingsley Wrote: > On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: > > I almost have to apologize for this question but .. > > > > How does one initialize a static rectangular array (2-d matrix) in D1? > > > > None of the following or other variations that I've tried compile wit

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Justin Johansson
Jarrett Billingsley Wrote: > On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: > > I almost have to apologize for this question but .. > > > > How does one initialize a static rectangular array (2-d matrix) in D1? > > > > None of the following or other variations that I've tried compile wit

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Jarrett Billingsley
On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: > I almost have to apologize for this question but .. > > How does one initialize a static rectangular array (2-d matrix) in D1? > > None of the following or other variations that I've tried compile with DMD > 1.0. > > int[2, 3] matrix = [ 1

How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Justin Johansson
I almost have to apologize for this question but .. How does one initialize a static rectangular array (2-d matrix) in D1? None of the following or other variations that I've tried compile with DMD 1.0. int[2, 3] matrix = [ 1, 2, 3, 4, 5, 6 ]; int[2, 3] matrix = [[ 1, 2, 3 ], [ 4, 5, 6 ]];

Re: Getting constructor's metadata

2009-10-08 Thread Christopher Wright
Max Samukha wrote: Is it possible to get types or aliases of all constructors of a class in D2? No. __traits has some random functionality in this regard. It has a command getVirtualFunctions which only returns virtual overloads. By "virtual", we mean "appears in vtbl". So any non-private, n

Re: How about macro == symbol for mixin statement? [was Re: Member functions C to D]

2009-10-08 Thread Christopher Wright
Bill Baxter wrote: It seems macros are implemented as compiler extensions. You compile your macros into DLLs first, that then get loaded into the compiler as plugins. On the plus side, doing things that way you really do have access to any API you need at compile-time, using the same syntax as

Re: Changing the preferred imagebase (dmd)?

2009-10-08 Thread Trass3r
Found it out in the meantime :) dmd test.d -L/BASE:8388608

Re: How about macro == symbol for mixin statement? [was Re: Member functions C to D]

2009-10-08 Thread Ary Borenszweig
Jarrett Billingsley wrote: On Thu, Oct 8, 2009 at 11:25 AM, Don wrote: Jarrett Billingsley wrote: On Thu, Oct 8, 2009 at 4:00 AM, Don wrote: So it looks to me like the mechanics of it are basically identical. Just Nemerle's syntax is nicer. Only with trivial examples. With more complicated

Re: How about macro == symbol for mixin statement? [was Re: Member functions C to D]

2009-10-08 Thread Jarrett Billingsley
On Thu, Oct 8, 2009 at 11:25 AM, Don wrote: > Jarrett Billingsley wrote: >> >> On Thu, Oct 8, 2009 at 4:00 AM, Don wrote: >> So it looks to me like the mechanics of it are basically identical. Just Nemerle's syntax is nicer. >>> >>> Only with trivial examples. With more complicated exam

Re: How about macro == symbol for mixin statement? [was Re: Member functions C to D]

2009-10-08 Thread Don
Jarrett Billingsley wrote: On Thu, Oct 8, 2009 at 4:00 AM, Don wrote: So it looks to me like the mechanics of it are basically identical. Just Nemerle's syntax is nicer. Only with trivial examples. With more complicated examples they look less identical. I'm basing my views on pages like this

Re: How about macro == symbol for mixin statement? [was Re: Member functions C to D]

2009-10-08 Thread Jarrett Billingsley
On Thu, Oct 8, 2009 at 4:00 AM, Don wrote: >> So it looks to me like the mechanics of it are basically identical. >> Just Nemerle's syntax is nicer. > > Only with trivial examples. With more complicated examples they look less > identical. I'm basing my views on pages like this: > > http://nemerl

Re: How about macro == symbol for mixin statement? [was Re: Member functions C to D]

2009-10-08 Thread Bill Baxter
On Thu, Oct 8, 2009 at 1:06 AM, Don wrote: > Jarrett Billingsley wrote: >> >> On Wed, Oct 7, 2009 at 11:21 AM, Don wrote: >>> >>> Steven Schveighoffer wrote: On Wed, 07 Oct 2009 09:17:59 -0400, Jarrett Billingsley wrote: > It's also insanely kludgy and ugly. Bleh. >>> >>>

Getting constructor's metadata

2009-10-08 Thread Max Samukha
Is it possible to get types or aliases of all constructors of a class in D2?

Re: How about macro == symbol for mixin statement? [was Re: Member functions C to D]

2009-10-08 Thread Don
Jarrett Billingsley wrote: On Wed, Oct 7, 2009 at 11:21 AM, Don wrote: Steven Schveighoffer wrote: On Wed, 07 Oct 2009 09:17:59 -0400, Jarrett Billingsley wrote: It's also insanely kludgy and ugly. Bleh. Ugly, yes. Kludgy, I don't think so. It's only a syntax issue. The basic concept of pa

Re: How about macro == symbol for mixin statement? [was Re: Member functions C to D]

2009-10-08 Thread Don
Bill Baxter wrote: On Wed, Oct 7, 2009 at 11:21 AM, Don wrote: By contrast, something like Nemerle macros are a kludge. The idea of providing a 'hook' into the compiler is a horrible hack. It exposes all kinds of compiler internals. Yes, it has nicer syntax. Are you talking specifically abo