DMD 0.163 release

Kirk McDonald kirklin.mcdonald at gmail.com
Tue Jul 18 19:34:06 PDT 2006


Walter Bright wrote:
> 
> http://www.digitalmars.com/d/changelog.html
> 
> This has all the new import changes in it. That breaks a lot of existing 
> code (like dmdscript), the fixes are simple (adding more import 
> declarations) but tedious.
> 
> I couldn't find a better keyword choice than "static import".
> 
> The renaming uses '=' instead of 'as', 'from', or 'alias' for the reasons:
> 
> 1) didn't want to add new keywords, especially ones like 'as' as I use 
> that as a variable name
> 
> 2) didn't need to add new keywords - adding them should be done only if 
> using punctuation is completely unappealing
> 
> 3) using '=' and ':' is visually more distinct than embedded keywords.

I just updated Pyd to work with 0.163 (which was pretty painless), and 
uncovered a pecular bug. I can't seem to reproduce the exact error with 
a small example, but (in short) it doesn't seem to like source files 
named "object.d". Renaming the source file in question (to 
"dpyobject.d", which is actually a more fitting name and a change I've 
been meaning to make) solved the problem.

For what it's worth, the precise compiler error was:

C:\Python24\lib\site-packages\celerid\infrastructure\pyd\object.d(41): 
identifier 'Object' is not defined
C:\Python24\lib\site-packages\celerid\infrastructure\pyd\object.d(41): 
Object is used as a type
Assertion failure: 'b->type->ty == Tclass' on line 342 in file 'class.c'

Line 41 is the top of the DPyObject class. It looks like, by calling my 
file object.d, it was somehow masking Phobos's object.d, and thus the 
Object class could not be found to subclass DPyObject from. Whatever. I 
renamed the file and it is now happy.

-- 
Kirk McDonald
Pyd: Wrapping Python with D
http://dsource.org/projects/pyd/wiki



More information about the Digitalmars-d-announce mailing list