October 24, 2006
On Tue, 24 Oct 2006 06:30:48 -0400, Olli Aalto <olli.aalto@cardinal.fi> wrote:

> Chris Miller wrote:
>> Check out the FAQ at http://www.dprogramming.com/dstring.php and give it a spin.
>> Documentation is online at http://www.dprogramming.com/docs/dstring/dstring.html
>>  Let me know what you think!
>
> Hi!
>
> The dstring module is very nice, but it's lacking one thing that I, at least personally, am gotten used to. It's that you cannot assign a null to it.
>
> string str = null;

I don't think this is possible.
The string is also automatically initialized to an empty/null string.

>
> or
>
> string getAStringWhichMightBeNull() { return null; }

There is string(), such as:
   string mystring = string();
or:
   myfunction(string());

>
> It's not a big thing but makes using the string a bit clumsy.
>
> One another thing. Not necessarily dstring's fault, but I tried compiling it with C::B in release mode. I had set every compiler option available for the release build and when I compiled I started getting errors about functions not returning any values. They were functions which had switches, which default cases had return statements.
> I don't know which flag causes this behavior, but a debug build works just fine.

I'm only getting this when using -w to get DMD to output warnings. I think DMD's warnings are terrible and I never use or consider them. Please don't use this switch.
October 24, 2006
Chris Miller wrote:
> On Tue, 24 Oct 2006 06:30:48 -0400, Olli Aalto <olli.aalto@cardinal.fi> wrote:
> 
>> Chris Miller wrote:
>>> Check out the FAQ at http://www.dprogramming.com/dstring.php and give it a spin.
>>> Documentation is online at http://www.dprogramming.com/docs/dstring/dstring.html
>>>  Let me know what you think!
>>
>> Hi!
>>
>> The dstring module is very nice, but it's lacking one thing that I, at least personally, am gotten used to. It's that you cannot assign a null to it.
>>
>> string str = null;
> 
> I don't think this is possible.
> The string is also automatically initialized to an empty/null string.
> 

Yes, and it's what makes the usefulness of the module pretty limited.
Empty string is not the same as a null string. Maybe this is just my Java background.

>>
>> or
>>
>> string getAStringWhichMightBeNull() { return null; }
> 
> There is string(), such as:
>    string mystring = string();
> or:
>    myfunction(string());
> 

I didn't get this part.

>>
>> It's not a big thing but makes using the string a bit clumsy.
>>
>> One another thing. Not necessarily dstring's fault, but I tried compiling it with C::B in release mode. I had set every compiler option available for the release build and when I compiled I started getting errors about functions not returning any values. They were functions which had switches, which default cases had return statements.
>> I don't know which flag causes this behavior, but a debug build works just fine.
> 
> I'm only getting this when using -w to get DMD to output warnings. I think DMD's warnings are terrible and I never use or consider them. Please don't use this switch.

I didn't have the -w switch on. I used -inline -O -release switches.

O.
1 2
Next ›   Last »