November 30, 2004 Re: Changelog | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | Stewart Gordon wrote: >> - Added std.c.stddef for definition of C wchar_t. > > For lazy people who like to c&p C declarations without having to change them? Or for people who like to write portable code... > version (Win32) > { > alias wchar wchar_t; > } > else version (linux) > { > alias dchar wchar_t; > } Guess I will have to wait for next GDC for Darwin. --anders |
November 30, 2004 Re: Changelog | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simon Buchan | Simon Buchan wrote: > - InExpressions now, instead of returning a bit, return a pointer to the associative array element if the key is present, null if it is not. This obviates - the need for many double lookups. nice! > - Added .ptr property to arrays, which is handier and more typesafe than casting an array to a pointer. cool. I'll start using that instead. It always felt funny to cast. > Get it at: ftp://ftp.digitalmars.com/dmd.107.zip now dmd.108.zip? |
November 30, 2004 Re: Changelog | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simon Buchan | Simon Buchan wrote: > - InExpressions now, instead of returning a bit, return a pointer to the associative array element if the key is present, null if it is not. This obviates - the need for many double lookups. The documentation needs to be updated to reflect this: (http://www.digitalmars.com/d/arrays.html#associative) > The InExpression yields a boolean result indicating if a key > is in an associative array or not: > > if ("hello" in b) > ... The InExpression yields a pointer to the associative array element if the key is present, or null if the key is not in the associative array. if (("hello" in b) != null) ... Assuming you want to pretend that there actually is a boolean type. Not that D cares about the difference between the two, but anyway. --anders PS. Still no way to perform a static init of an associative array ? |
November 30, 2004 Re: DMD 0.107 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | In article <cohhg4$o36$1@digitaldaemon.com>, Stewart Gordon says... > >Kris wrote: >> Please don't do that yet; I just sent you a problem with dmd-107. It breaks all the ICU bindings ... ><snip top of upside-down reply> > >I think Walter was joking. For those who haven't seen it already, we have a list of reasons we're far from ready for 1.0: > >http://www.wikiservice.at/wiki4d/wiki.cgi?PendingPeeves Can't you do better then that? The quality of it is very low. 1 - Walter expressly said he didn't want bug lists 2 - points to all sorts of less then relevant discussions Ant |
November 30, 2004 Re: DMD 0.107 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | Ant wrote: <snip> >> http://www.wikiservice.at/wiki4d/wiki.cgi?PendingPeeves > > > Can't you do better then that? > The quality of it is very low. > > 1 - Walter expressly said he didn't want bug lists > 2 - points to all sorts of less then relevant discussions I don't see what you mean. Please be specific. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
November 30, 2004 Re: Changelog | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | "Ben Hinkle" <bhinkle4@juno.com> wrote in message news:cohso3$18hc$1@digitaldaemon.com... > Simon Buchan wrote: > > - InExpressions now, instead of returning a bit, return a pointer to the associative array element if the key is present, null if it is not. This obviates - the need for many double lookups. > > nice! That double lookup problem was pointed out here a while back, but I couldn't think of a decent solution. Finally, I had a brainwave <g>. > > - Added .ptr property to arrays, which is handier and more typesafe than casting an array to a pointer. > cool. I'll start using that instead. It always felt funny to cast. Yes, I think so too. > > Get it at: ftp://ftp.digitalmars.com/dmd.107.zip > > now dmd.108.zip? Fixes Kris' build break. |
November 30, 2004 Re: Changelog | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | "Anders F Björklund" <afb@algonet.se> wrote in message news:cohvm9$1e76$1@digitaldaemon.com... > The documentation needs to be updated to reflect this: (http://www.digitalmars.com/d/arrays.html#associative) Good catch, thanks. > PS. Still no way to perform a static init of an associative array ? That's a 2.0 feature! |
November 30, 2004 Re: Changelog | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote:
>>PS. Still no way to perform a static init of an associative array ?
>
> That's a 2.0 feature!
That's OK, you can't do 'em in Java either...
(static initalizer code works in the meantime)
--anders
|
December 01, 2004 Anonymous structs/unions still not working right (was: Changelog) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simon Buchan | Simon Buchan wrote: <snip> > - Fixed initialization of anonymous structs in classes. > - Anonymous structs/unions can now only be a member of an aggregate. OK, so one of my previous minimal testcases now complies. However, somehow the fixes seem to have managed to exclude the uses to which SDWF puts the constructs. 1. Initialisation still screws up when a union is involved. ---------- class Qwert { union { struct { int yuiop = 13; } int asdfg; } } ---------- D:\My Documents\Programming\D\Tests\bugs\broken108_init.d(1): class broken108_init.Qwert 2duplicate union initialization for yuiop ---------- 2. Giving one of the struct/union members an access attribute renders it invisible. If the initialiser is removed from the above example, it compiles and runs OK. But if I do this: ---------- import std.stdio; class Qwert { union { struct { int yuiop; } public int asdfg; } } void main() { Qwert hjkl = new Qwert; writefln(hjkl.yuiop); writefln(hjkl.asdfg); } ---------- D:\My Documents\Programming\D\Tests\bugs\broken108_anon.d(16): no property 'asdfg' for type 'Qwert' ---------- The same error occurs if I replace the class definition with any of the following: ---------- class Qwert { union { struct { int yuiop; public int asdfg; } protected int zxcvb; } } ---------- class Qwert { struct { int yuiop; public int asdfg; } } ---------- class Qwert { union { int yuiop; public int asdfg; } } ---------- Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
December 01, 2004 Re: Changelog | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simon Buchan | "Simon Buchan" <currently@no.where> escribió en el mensaje news:opsh9jq4ufjccy7t@simon.homenet... | For lazy people with Newsreaders: | | New/Changed Features | - Added Ben Hinkle's changes to std.stream: | adds EndianStream for BOM and endian support. | removes the two public imports std.string and std.file from end of file | adds read/write for ifloat, idouble, cfloat, cdouble and dchar to | interfaces InputStream and OutputStream and add implementations to Stream | and EndianStream Thanks for that, Ben! ----------------------- Carlos Santander Bernal |
Copyright © 1999-2021 by the D Language Foundation