December 09, 2001
Now even more funny. I've made all identifiers in mod1 fully qualified:

    // mod1.d, line 10
    mod2.greet();

Compiling:

    > mars mod1.d mod2.d
    mod1.d(10): undefined identifier
Expression::toCBuffer('import').greet.greet

?WHAT THE?


December 09, 2001
I use it all over my MSVC code.

Frankly, any superfluous semicolons should be treated by the compiler as null statements.  I know that that is true in code, I can't swear that it's accurate in function body declarations...but I think that it's true there, too.

--
The Villagers are Online! http://villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]


December 09, 2001
Walter wrote:

> This is mainly to help along discussion of language features and to see what fundamental issues I've overlooked!
> 
> ftp://ftp.digitalmars.com/dmdalpha.zip
> 
> Enjoy.

Buck! The license in the download that seems to cover now this project doesn't look like something I like ....

- Axel
December 09, 2001
While I intend to do some sort of open source license in the future, for the moment I think it's best that it be given some time to gel before multiple incompatible versions appear <g>. A colleague of mine is investigating what it would take to hook it up to GCC's back end.

"Axel Kittenberger" <axel@dtone.org> wrote in message news:9v0gf1$qt$1@digitaldaemon.com...
> Walter wrote:
>
> > This is mainly to help along discussion of language features and to see what fundamental issues I've overlooked!
> >
> > ftp://ftp.digitalmars.com/dmdalpha.zip
> >
> > Enjoy.
>
> Buck! The license in the download that seems to cover now this project doesn't look like something I like ....
>
> - Axel


December 09, 2001
Ok, I'll fix it to allow empty declarations, mainly to be symmetric with allowing empty statements. -Walter

"Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:3C12B1C5.47154D71@deming-os.org...
> Bug 0001: Trailing (superfluous) semicolons cause syntax errors.
>
> I know, I know, all the style purists hate me for this...but somewhere,
early
> when I learned C++, I got into the habit of adding superfluous semicolons
after
> my functions and other blocks:
>
> void foo()
> {
>     ....
> };
> It's ugly (to most people's eyes), but legal (I think)



December 10, 2001
"Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:3C12B2C8.949F65F3@deming-os.org...
> Bug 0002: Link problems
>
> I compiled the following source file, wanting to test out how the GC
works:
>
>         import stdio;
>
>         class Foo
>         {
>           static this() { printf("%p ",this); }

The static is an error, it is now diagnosed.

>           ~this () { printf("~%p ",this); }
>         }
>
>         int main()
>         {
>           {
>             Foo ptr = new Foo;
>             printf("x");
>           }
>           printf("x");
>           long i;
>           for(i=0; i<1000*1000*1000; i++);

Empty loops should be {}, this is now diagnosed.

>           printf("x");
>           return 0;
>         }
>
> My makefile was as follows:
>
>         russ.exe: russ.obj
>                 link ..\lib\phobos.lib ..\lib\snn.lib russ.obj

This command will link in the entire libraries, instead of just searching
them. Try:
    sc russ.obj
to link.




December 10, 2001
"Pavel Minayev" <evilone@omen.ru> wrote in message news:9uvcm8$2dng$1@digitaldaemon.com...
> Now when I run it, Foo gets created but is never destroyed, even with 1000000000 iterations of loop! Shouldn't the GC run at the end of the program anyhow?

It does now. <g>

> Also note one weird thing. null is a void*, and is incompatible with any other pointers, requiring explicit cast! This should definitely be changed...

Hmm. I've seen different positions on this!


December 10, 2001
"Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:3C12B418.BF0C42F3@deming-os.org...
> I tried to use the compiler to link in a .lib file with something I was compiling, since I've seen that done on gcc.  I don't know if the DM d
compiler
> supports that sort of thing, but instead of reporting an error I get an
"Illegal
> Operation" window with the following line:
>
>     mars russ.d -I..\src\phobos ..\lib\phobos.lib

The mars executable doesn't handle the link step, you need to link separately using sc:

    sc russ.obj

should do it.


December 10, 2001
Walter wrote:
> 
> While I intend to do some sort of open source license in the future, for the moment I think it's best that it be given some time to gel before multiple incompatible versions appear <g>. A colleague of mine is investigating what it would take to hook it up to GCC's back end.

	You'll have to let us know how that goes.  Frankly, I'm not in the mood
to buy, install and setup windows in a semi-comfortable manner just to
test an alpha compiler.

Dan
December 10, 2001
Walter wrote:

> The static is an error, it is now diagnosed.

Yeah, that seemed odd, but I found that syntax in the sample a.d.  So I guess it's an error there :)

> Empty loops should be {}, this is now diagnosed.

(slap forehead) Yeah, that was a requirement, wasn't it?

> This command will link in the entire libraries, instead of just searching
> them. Try:
>     sc russ.obj
> to link.

Thanks!

--
The Villagers are Online! http://villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]