D - Problems and bugs in 0.76. - 0.76.zip
- one_mad_alien hotmail.com (215/215) Dec 04 2003 I have returned to D (as I have some apps that would take a long time to...
- J C Calvarese (28/129) Dec 04 2003 I've already spent some time working on getting your libs to compile
- one_mad_alien hotmail.com (22/63) Dec 06 2003 good stuff,
- Matthew Wilson (5/18) Dec 04 2003 missing
- Charles Sanders (26/107) Dec 05 2003 Glad your back mike!
- one_mad_alien hotmail.com (5/10) Dec 06 2003 hopefully it will be online later (6 hours after this was posted)
I have returned to D (as I have some apps that would take a long time to port to a different lang) I like the changes to phobos (and I'll update my DFC/win32 com libs hopefully over the weekend) for those who are using them. however, it seems that 0.76 still has a few issues ... I've given up ranting about semantics over implementation instead here's some basics that don't work! this archive contains the following scripts. newtest.d : unable to 'new' a 2d array of object newtest.d(3): Integer constant expression expected instead of w the following code causes the error .... int[][] create_2d( int w, int h ) { return new int[w][h]; } platetest.d : template forward reference problems. instance UserControl(MyApp ) does not match any template declaration it does only MyApp is a forward ref. twintest.d : more template importing tests. instance MyControl(MyApp2 ) cannot resolve forward reference same again, unfortunatly I can not re produce the actual error I was tracking which was due to an typo in an included template causing the same error but not warning that the included template contained an error. it would be good if errors showed the included files (like gcc does) i.e. error in foo.d(99) included from bar.d(4) included from main.d(9) imptest.d : unable to always use fully qualified names. imptest.d(15): undefined identifier std I have been unable to actually repro the error but there are issues with using fully qualified names without an import i.e 'std.c.stdio.printf( ..... );' noret.d : no return assert is NOT an Exception or Error!! also the import is 'import std.asserterror;' but the module is 'module std.assertexception;' Why is AssertError NOT and Error!, and why is Error and Exception would it not be better to follow the Java model ? Throwable; Error : Throwable; Exception : Throwable; and throw can only throw a Throwable (rather than an Object (throwables have space for stack trace etc) am I the only one driven to dispare 'cos A AssertError is not and Exception and B no warning/error is given that a function has a missing return or missing default in a switch. inttest.d : more 'C' style cast problems (again due to forward refs etc). inttest.d(8): can only * a pointer, not a 'int' MORE problems with 'C' style casts, they can NEVER work in D as unlike C the nature of statment segment '(id)' can not be determined at parse time (C/C++ knows if 'id' is a typedef of var etc at the time it is parsed). how many times must ppl request the removal of 'C' casts gctest.d : phobos errors (unable to 'import internal.gc.gc;') Attempting to compile gctest.d Error: Error reading file 'gcx.d' it seems that 'internal.*' are not importable. innertest.d : an attempt to use operator new to create 'Java(tm)' style inner classes this was an experiment in attempting to use the 'operator new' to create Java Style inner classes Foo f = new( parent ) Foo( params ); however it imposible to effect the classinfo.init of the Foo or set memebers within the new. I think if 'new' is called then it should be able to operate in two modes mode 1 ... it just allocates the memory D runtime does all the setup mode 2 ... it calls into D (or D gives it the memory) and pre inits values so D does the following: if there is a static new with the right params p = call operator new ( size, new params ); else p = _d_newclass; d initialisation of memory for class if there is a non static new call p.operator new ( new params ) call construction with construction params; matchtest.d : static and instance functions with same names (different params) matchtest.d(16): need 'this' to access member func I have two functions both with the same name, only different params and one is static and one is a member function, the above error implies that an explicit 'this' is required, but when it put in the error implies that D is now matching with the static version! matchtest2.d : static and instance functions with same names (different params) this used but the error is about the static form matchtest2.d(15): Error: expected 4 arguments, not 3 matchtest2.d(15): cannot implicitly convert char[3] to int begin 0644 0.76.zip ME,%/ S`4QN\D_`]O!Y+M(!J.)DLTHXO&.1*VN,LNI:NCIK0+E$W_>X$-!H)$ MZHGPO7[O_=JOZ0.:/7G S>>FL4)K<%_=Z>Q^NXMVVX")_&L:Q0JL%(T.BHD] M*`E$1 ?&:0R"GA1-E)TMLS*O!3>DKK%WL)#O>_X"O:&%-9W>P;AH][R&C>>_ M(!>6WF8TF !:K!`4I8L="!8 I(*`EN-*EL<N%CAPK& +IJ'JX%0-! .I$Q,M MGKJH U/Z!].P3/H)4]-T6"[VP2A"QK0&4OW^RA"G0N0]BI60SZQC%):R"R2A M3/FNG&4:A=[1VW'.;H+3?: VP).$AHKH)^$9LA2 &W;,#Z%7\7F9/!!B;JM MJA/3H"240.-8QL#ID7 MPLQ*<`;OMK8((RCM,+1^A\H'P>\U5\A:T=X=4Q3).'S:0^X*_GIZ-U!+`P04 MG6WP'42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* X0O MLA-$R(`"``"4!P``$``````````!`"``MH&%!```,"XW-B]I;FYE<G1E<W0N M9%!+`0(4`!0````(`*T.A"_'D*^I ````+<````.``````````$`(`"V 3,' M```P+C<V+VEN='1E<W0N9%!+`0(4`!0````(`-:3A"\R'];TBP```/\````0 M``````````$`(`"V =\'```P+C<V+VUA=&-H=&5S="YD4$L!`A0`%````` ` M`#JC R\PP Z:^`````D"```0``````````$`(`"V <X+```P+C<V+W!L871E M=&5S="YD4$L!`A0`%````` `DI2$+X2('\QI!```5PT```\``````````0` M`!8!```.``````````$`(`"V 8H1```P+C<V+W1W:6YL:6(N9%!+`0(4`!0` M:6YT97-T+F102P$"%``*``````"LE(0O````````````````!0`````````` D`!``_T$($P``,"XW-B]02P4&`````!``$`"]`P``*Q,````` ` end
Dec 04 2003
one_mad_alien hotmail.com wrote:I have returned to D (as I have some apps that would take a long time to port to a different lang)Welcome back.I like the changes to phobos (and I'll update my DFC/win32 com libs hopefully over the weekend) for those who are using them.I've already spent some time working on getting your libs to compile with DMD 0.76. I don't know if it helps you any, but you can find my efforts at: http://jcc_7.tripod.com/d/ I didn't keep track of where I made changes but I've found a free program that helps compare two similar text files called WinMerge: http://winmerge.sourceforge.net/ Scroll down to see my suggestions for how fix some of you problems...however, it seems that 0.76 still has a few issues ... I've given up ranting about semantics over implementation instead here's some basics that don't work! this archive contains the following scripts. newtest.d : unable to 'new' a 2d array of object newtest.d(3): Integer constant expression expected instead of w the following code causes the error .... int[][] create_2d( int w, int h ) { return new int[w][h]; }I think you might want something like this (at least it compiles)... int[][] create_2d( int w, int h ) { int[][] dummy; dummy.length = h; for (int i = 0; i < h; i++) dummy[i].length = w; return dummy; }platetest.d : template forward reference problems. instance UserControl(MyApp ) does not match any template declaration it does only MyApp is a forward ref. twintest.d : more template importing tests. instance MyControl(MyApp2 ) cannot resolve forward reference same again, unfortunatly I can not re produce the actual error I was tracking which was due to an typo in an included template causing the same error but not warning that the included template contained an error. it would be good if errors showed the included files (like gcc does) i.e. error in foo.d(99) included from bar.d(4) included from main.d(9) imptest.d : unable to always use fully qualified names. imptest.d(15): undefined identifier std I have been unable to actually repro the error but there are issues with using fully qualified names without an import i.e 'std.c.stdio.printf( ..... );'Add this line before main in imptest (compiles for me now): import std.c.stdio; /* added by JCC */noret.d : no return assert is NOT an Exception or Error!! also the import is 'import std.asserterror;' but the module is 'module std.assertexception;' Why is AssertError NOT and Error!, and why is Error and Exception would it not be better to follow the Java model ? Throwable; Error : Throwable; Exception : Throwable; and throw can only throw a Throwable (rather than an Object (throwables have space for stack trace etc) am I the only one driven to dispare 'cos A AssertError is not and Exception and B no warning/error is given that a function has a missing return or missing default in a switch. inttest.d : more 'C' style cast problems (again due to forward refs etc). inttest.d(8): can only * a pointer, not a 'int' MORE problems with 'C' style casts, they can NEVER work in D as unlike C the nature of statment segment '(id)' can not be determined at parse time (C/C++ knows if 'id' is a typedef of var etc at the time it is parsed). how many times must ppl request the removal of 'C' casts gctest.d : phobos errors (unable to 'import internal.gc.gc;') Attempting to compile gctest.d Error: Error reading file 'gcx.d' it seems that 'internal.*' are not importable.Try replacing import internal.gc.gc; with import std.gc; The compiler seems to like the change. Good luck with these problems. Justininnertest.d : an attempt to use operator new to create 'Java(tm)' style inner classes this was an experiment in attempting to use the 'operator new' to create Java Style inner classes Foo f = new( parent ) Foo( params ); however it imposible to effect the classinfo.init of the Foo or set memebers within the new. I think if 'new' is called then it should be able to operate in two modes mode 1 ... it just allocates the memory D runtime does all the setup mode 2 ... it calls into D (or D gives it the memory) and pre inits values so D does the following: if there is a static new with the right params p = call operator new ( size, new params ); else p = _d_newclass; d initialisation of memory for class if there is a non static new call p.operator new ( new params ) call construction with construction params; matchtest.d : static and instance functions with same names (different params) matchtest.d(16): need 'this' to access member func I have two functions both with the same name, only different params and one is static and one is a member function, the above error implies that an explicit 'this' is required, but when it put in the error implies that D is now matching with the static version! matchtest2.d : static and instance functions with same names (different params) this used but the error is about the static form matchtest2.d(15): Error: expected 4 arguments, not 3 matchtest2.d(15): cannot implicitly convert char[3] to int
Dec 04 2003
In article <bqo6dj$1it0$1 digitaldaemon.com>, J C Calvarese says...one_mad_alien hotmail.com wrote:cheers :)I have returned to D (as I have some apps that would take a long time to port to a different lang)Welcome back.I've already spent some time working on getting your libs to compile with DMD 0.76. I don't know if it helps you any, but you can find my efforts at: http://jcc_7.tripod.com/d/good stuff,I didn't keep track of where I made changes but I've found a free program that helps compare two similar text files called WinMerge: http://winmerge.sourceforge.net/I'll check it out, currently I use Araxis Merge (bought it a couple of years ago, as it works well with perforce)I used a template as a work around ... template Array( T ) { T[][] create_2D( int w, int h ) { T[][] rv = new T[][h];//new T[w][h]; for( int i = 0; i < h; i++ ) { rv[i] = new T[w]; } return rv; } } // to use int[][] twod = instance Array(int).create_2D( a,b );newtest.d : unable to 'new' a 2d array of object newtest.d(3): Integer constant expression expected instead of w the following code causes the error .... int[][] create_2d( int w, int h ) { return new int[w][h]; }I think you might want something like this (at least it compiles)... int[][] create_2d( int w, int h ) { int[][] dummy; dummy.length = h; for (int i = 0; i < h; i++) dummy[i].length = w; return dummy; }this example did not quite report the same error as I was getting from fully qualified names, but either way they should either work or not work (rather than half work).imptest.d : unable to always use fully qualified names. imptest.d(15): undefined identifier std I have been unable to actually repro the error but there are issues with using fully qualified names without an import i.e 'std.c.stdio.printf( ..... );'Add this line before main in imptest (compiles for me now): import std.c.stdio; /* added by JCC */std.gc does not import gc.malloc (well, not on my machine!) Mike.gctest.d : phobos errors (unable to 'import internal.gc.gc;') Attempting to compile gctest.d Error: Error reading file 'gcx.d' it seems that 'internal.*' are not importable.Try replacing import internal.gc.gc; with import std.gc;
Dec 06 2003
noret.d : no return assert is NOT an Exception or Error!! also the import is 'import std.asserterror;' but the module is 'module std.assertexception;' Why is AssertError NOT and Error!, and why is Error and Exception would it not be better to follow the Java model ? Throwable; Error : Throwable; Exception : Throwable; and throw can only throw a Throwable (rather than an Object (throwableshavespace for stack trace etc) am I the only one driven to dispare 'cos A AssertError is not andExceptionand B no warning/error is given that a function has a missing return ormissingdefault in a switch.You're not. Several people are currently campaigning to incline Walter to remove such shocking warts
Dec 04 2003
Glad your back mike! I have modified DFC a bit and added some stuff, renamed it Windy, ill put it up shortly. Let me know when you get the COM stuff updated id like to take a gander at it. C <one_mad_alien hotmail.com> wrote in message news:bqo23h$1cp3$1 digitaldaemon.com...I have returned to D (as I have some apps that would take a long time toport toa different lang) I like the changes to phobos (and I'll update my DFC/win32 com libshopefullyover the weekend) for those who are using them. however, it seems that 0.76 still has a few issues ... I've given up ranting about semantics over implementation instead here's some basics that don't work! this archive contains the following scripts. newtest.d : unable to 'new' a 2d array of object newtest.d(3): Integer constant expression expected instead of w the following code causes the error .... int[][] create_2d( int w, int h ) { return new int[w][h]; } platetest.d : template forward reference problems. instance UserControl(MyApp ) does not match any template declaration it does only MyApp is a forward ref. twintest.d : more template importing tests. instance MyControl(MyApp2 ) cannot resolve forward reference same again, unfortunatly I can not re produce the actual error I wastrackingwhich was due to an typo in an included template causing the same errorbut notwarning that the included template contained an error. it would be good if errors showed the included files (like gcc does) i.e. error in foo.d(99) included from bar.d(4) included from main.d(9) imptest.d : unable to always use fully qualified names. imptest.d(15): undefined identifier std I have been unable to actually repro the error but there are issues withusingfully qualified names without an import i.e 'std.c.stdio.printf( ..... );' noret.d : no return assert is NOT an Exception or Error!! also the import is 'import std.asserterror;' but the module is 'module std.assertexception;' Why is AssertError NOT and Error!, and why is Error and Exception would it not be better to follow the Java model ? Throwable; Error : Throwable; Exception : Throwable; and throw can only throw a Throwable (rather than an Object (throwableshavespace for stack trace etc) am I the only one driven to dispare 'cos A AssertError is not andExceptionand B no warning/error is given that a function has a missing return ormissingdefault in a switch. inttest.d : more 'C' style cast problems (again due to forward refs etc). inttest.d(8): can only * a pointer, not a 'int' MORE problems with 'C' style casts, they can NEVER work in D as unlike Cthenature of statment segment '(id)' can not be determined at parse time(C/C++knows if 'id' is a typedef of var etc at the time it is parsed). how many times must ppl request the removal of 'C' casts gctest.d : phobos errors (unable to 'import internal.gc.gc;') Attempting to compile gctest.d Error: Error reading file 'gcx.d' it seems that 'internal.*' are not importable. innertest.d : an attempt to use operator new to create 'Java(tm)' styleinnerclasses this was an experiment in attempting to use the 'operator new' to createJavaStyle inner classes Foo f = new( parent ) Foo( params ); however it imposible to effect the classinfo.init of the Foo or setmemeberswithin the new. I think if 'new' is called then it should be able to operate in two modes mode 1 ... it just allocates the memory D runtime does all the setup mode 2 ... it calls into D (or D gives it the memory) and pre inits values so D does the following: if there is a static new with the right params p = call operator new ( size, new params ); else p = _d_newclass; d initialisation of memory for class if there is a non static new call p.operator new ( new params ) call construction with construction params; matchtest.d : static and instance functions with same names (differentparams)matchtest.d(16): need 'this' to access member func I have two functions both with the same name, only different params andone isstatic and one is a member function, the above error implies that anexplicit'this' is required, but when it put in the error implies that D is nowmatchingwith the static version! matchtest2.d : static and instance functions with same names (differentparams)this used but the error is about the static form matchtest2.d(15): Error: expected 4 arguments, not 3 matchtest2.d(15): cannot implicitly convert char[3] to int
Dec 05 2003
In article <bqqqqr$2edb$1 digitaldaemon.com>, Charles Sanders says...Glad your back mike!cheers,I have modified DFC a bit and added some stuff, renamed it Windy, ill put it up shortly. Let me know when you get the COM stuff updated id like to take a gander at it.hopefully it will be online later (6 hours after this was posted) just got to re-tests the imbedded MSIE code. Mike.
Dec 06 2003