Re: Question about contracts on methods.

2009-11-28 Thread Peter C. Chapin
Lutger wrote in news:hescc2$16...@digitalmars.com: > You are not missing something, this is a known issue. It has been > discussed and I believe the intention was to do something about this, > but with all the high priorities I'm not sure when this will be > solved. Okay, thanks for the inform

Re: Question about contracts on methods.

2009-11-28 Thread Lutger
Peter C. Chapin wrote: > Hi! > > I'm rather new to D and I'm experimenting with its support for > contracts. I'm using dmd v1.51 on Windows. > > Whenever I learn a new language I usually start by implementing a few > "classic" components to get a feeling for how the language's features > work in

Re: Detect runtime vs ctfe?

2009-11-28 Thread Robert Clipsham
Nick Sabalausky wrote: Is there an idiom, preferably D1, to detect whether or not the code is currently executing as a ctfe? Ie: void foo() { (static?) if( ) { // Run-time code here // that does stuff the CTFE engine chokes on } else { // CTFE c

Detect runtime vs ctfe?

2009-11-28 Thread Nick Sabalausky
Is there an idiom, preferably D1, to detect whether or not the code is currently executing as a ctfe? Ie: void foo() { (static?) if( ) { // Run-time code here // that does stuff the CTFE engine chokes on } else { // CTFE code here // that

Question about contracts on methods.

2009-11-28 Thread Peter C. Chapin
Hi! I'm rather new to D and I'm experimenting with its support for contracts. I'm using dmd v1.51 on Windows. Whenever I learn a new language I usually start by implementing a few "classic" components to get a feeling for how the language's features work in a pseudo-realistic setting. A class

Re: Reference counting for resource management

2009-11-28 Thread Don
LMB wrote: Hello, This should be my first post here, but I just posted the same message on the "standard" D newsgroup by mistake (what a noob! :-P) So, here I go again, on the right forum this time... I am trying to create yet another D2 wrapper for SQLite. As usual with many C libraries, SQ

Re: Access to fixed memory locations, head const, ...

2009-11-28 Thread wakko
Hi, I'm contemplating using D for an embedded project where system configuration registers have fixed memory locations. One way of doing it would be to have a constant pointer to a structure with manually aligned members that match the register map, and access them like that. This becomes cu