On 21/01/11 01:02, Steven Schveighoffer wrote:
On Thu, 20 Jan 2011 08:47:28 -0500, Justin Johansson wrote:
Not long ago the Java Language people introduced the idea of
annotations together with an annotation processing tool (apt).
Now perhaps the idea of source code annotations is not
On 21/01/11 00:47, Justin Johansson wrote:
Not long ago the Java Language people introduced the idea of annotations
together with an annotation processing tool (apt).
Now perhaps the idea of source code annotations is not actually a Java
invention per se, however for someone learning D is there
Not long ago the Java Language people introduced the idea of annotations
together with an annotation processing tool (apt).
Now perhaps the idea of source code annotations is not actually a Java
invention per se, however for someone learning D is there any equivalent
idiom [of Java annotations
BCS Wrote:
> Hello Justin,
>
> > With respect to the dmd -release compiler switch,
> > are assert statements meant to be compiled in release code?
> > Whilst the D1 spec says "The compiler may optionally not evaluate
> > assert expressions at all.",
> > my intuition suggests that asserts would/sh
bug assert(cond);
Lastly, will assert/switch behaviour change in D2?
Thanks for all help,
Justin Johansson
Bill Baxter Wrote:
> You query presence of a key in an AA using 'in'
Thank you Bill .. esp. the tip to avoid double lookup.
JJ
What's wrong with this simple symbol table class?
class Symbol
{
private char[] id;
private static Symbol[char[]] symtab;
private this( string id) {
this.id = id;
}
static Symbol opCall( char[] id) {
Symbol sym = symtab[id]; // *** ArrayBoundsError here
if (sym
: not found
So what's the best way to do a side-by-side install of D1 and D2 on linux?
As usual, thanks for all kind assistance,
-- Justin Johansson
Max Samukha Wrote:
> On Wed, 14 Oct 2009 14:20:24 -0400, Justin Johansson
> wrote:
>
> >#ponce Wrote:
> >
> >> It's a bit unclear to me.
> >>
> >> I know I must compare references with is but pointers ?
> >
> >Thanks fo
#ponce Wrote:
> It's a bit unclear to me.
>
> I know I must compare references with is but pointers ?
Thanks for asking this question ponce; I've been getting into the habit of
using 'is' for both pointers
and classes, so in similar vein to ponce's question, I'd like to ask if the
following (
one D
source module
and just run with that .. though the idea of actually embedding directly into D
does
have some real appeal (at least to me).
Hope this makes sense and, as usual, thanks for all help,
-- 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 v
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 v
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 ]];
downs Wrote:
> Justin Johansson wrote:
> > Daniel Keep Wrote:
> >
> > Just now I've written a bit of CS101 play around code (shown below) for
> > constructing a
> > singly-linked list of numbers (Conslist idiom). As the code seems to work,
> > it
grauzone Wrote:
> Justin Johansson wrote:
> > How does one determine the sizeof (in bytes) of an instance of a class in D?
> >
> > .sizeof works as advertised for structs, but for reference types,
> > .sizeof yields the sizeof the referencing variable (effectively sam
Jeremie Pelletier Wrote:
> Justin Johansson wrote:
> > Jarrett Billingsley Wrote:
> >
> >> On Sat, Oct 3, 2009 at 5:50 PM, Justin Johansson wrote:
> >>> How does one determine the sizeof (in bytes) of an instance of a class in
> >>> D?
> >
Daniel Keep Wrote:
> Justin Johansson wrote:
> > There was mention** on the general discussion group that the D
> > foreach_reverse
> > language construct could be replaced (emulated?) with a (D) meta-program.
> >
> > ** "Even a novice programm
There was mention** on the general discussion group that the D foreach_reverse
language construct could be replaced (emulated?) with a (D) meta-program.
** "Even a novice programmer can write a meta-program to replace
foreach_reverse without any runtime performance hit."
http://www.digitalmar
Jeremie Pelletier Wrote:
> Justin Johansson wrote:
> > Jarrett Billingsley Wrote:
> >
> >> On Sat, Oct 3, 2009 at 5:50 PM, Justin Johansson wrote:
> >>> How does one determine the sizeof (in bytes) of an instance of a class in
> >>> D?
> >
Jarrett Billingsley Wrote:
> On Sat, Oct 3, 2009 at 5:50 PM, Justin Johansson wrote:
> > How does one determine the sizeof (in bytes) of an instance of a class in D?
> >
> > .sizeof works as advertised for structs, but for reference types,
> > .sizeof yields the size
How does one determine the sizeof (in bytes) of an instance of a class in D?
.sizeof works as advertised for structs, but for reference types,
.sizeof yields the sizeof the referencing variable (effectively same as size of
a pointer)
and not the size of the underlying instance.
I did try scannin
22 matches
Mail list logo