April 14, 2005
James Dunne wrote:
>> I would like to see it simplified first because it would be better
>> that way and I'm all for making it better, and second because it
>> would mean that more people could learn the language who might not otherwise.
> 
> Not to sound arrogant or anything... but people that could learn the
> language better with an implied main function are just the people we
> don't want programming in the first place.

I actually don't like this being said out aloud.

BUT, I REALLY DO AGREE HERE!

> There, someone finally said it :-P.  I, for one, am tired of looking
> at code written by bad programmers.  Dumbening (thanks Lisa Simpson)
> languages up is not going to help make better coders - just more
> bad/mediocre ones.
> 
> It's almost akin to saying "lets remove all prepositions from English
> to make it easier for dumber kids to speak it."  What does this do to
> the overall quality of the English language (as if it was ever that
> great to begin with)?  The result:  we're all talking like morons.

That is gravely Politically non-Correct.  :-)

But the fact remains. A serious language is for serious work. And that gets disturbed if the, er, wrong kind of people populate our cubicles /en masse/.

And hey, there is always VB for them. :-(

I've talked with quite a few programming language teachers, at university level. Most of them confess, that the first few weeks they go on like madmen, in order to get the weaker students to quit early. That leaves more energy and time to spend on those who really do have a chance of learning the stuff. Sad to say. But I feel everybody gains here. Even those who got "ousted", because then they can concentrate on other classes that better suit their talent.

-----

That said, of course D (or any good language) should be easy to use, and be designed to not cause unnecessary work or problems (as opposed to C++).
April 14, 2005
What order of source files?  D uses modules. Unless someone specifically wants a textual include, the order of the source files shouldn't make any difference.... and when someone does want to use textual includes, they should write their code accordingly.  Nothing problematic about that.  Just added flexability when D programmers think like D programmers rather than like they're still stuck in the C language.

Okay, you wanted an example?

version (Windows)
{
 MessageBoxA(null,"click OK to continue","message_box",MB_OK);
}

save as pausok.d and compile with
DMD pausok

In the current version, that wouldn't even compile... but it wouldn't take a lot of changes to make it so that it would.  In fact, adding implied imports and including "MessageBoxA" in the implied imports list would keep the compilation from failing due to the lack of "import windows;" in the source code, and version sensative automatic linking would cause the compiler to built a properly linked executable by default, while still also producing an unlinked object file.

You tested what? I'm not talking about long filenaes support in the language here.  I'm talking about the Digital Mars D compiler itself.  Sorry it I was ambiguous.  Try compiling a file named longfilename.d and you will get an error to the effect of "C:\DM\TEST\LONGFI~1.D: module LONGFI~1 has non-identifier characters in filename, use module declaration instead".

At least, that's what happens in Windows 98.  Maybe on another operating system this is not the case.  The inability to compile at all is probably the "~" character being used in the MS_DOS short filename that Windows is automatically generated by the operating system for the benefit of programs that only support <= 8 character long filenames with <= 3 character extensions.  The DMD compiler apears to be one of those programs.  That's what I was suggesting should be corrected.

Okay, now that's cool.  I'm guessing the dmd.conf is for something other than Windows, since I don't seem to have one.  (Sounds like Linus to me.) but I would have never thought to look for "sc.ini" though.  Any idea what the "sc" stands for?  Anyway... thank you very much for that!  Do you know if there are other settings that can be placed in that file, besides just modifying those that are there by default?

No need for a virtual machine, unless you want to compile for a platform that you don't have, and then run the resulting executable on a virtual machine... but IDE stands to "integrated development environment" and is more than just an editor.  The whole idea behind the IDE concept is that the editor and the compiler are really two parts of one thing.  Integrating those two parts can save developers a lot of trouble, especially if done well.  Microsoft Visual Studio 6.0 is a great example of one that was done quite poorly.  Lots of nice features, but the integration is loose and incomplete at best.

The D language was designed with integration in mind. That much is obvious. To what extent integration between editor, linker, and compiler was intended to be supportd, I could only guess. Ideally, the D programmer shouldn't have to switch between an editor and a compiler and/or linker to build and run programs as they are written.

In fact, it should even be "possible" to run hidden "simulated tests" automatically at crucial times such as when the cursor moves out of a particular enclosed scope, using the unittest function if one has been written within the module. Such an option could be turned on or off from a menu, and the preference saved automatically, rather than having to be specified as a compiler switch at the command prompt.

Hmmm.  Crosscompiling.  Now, there's a thought I hadn't had.  Cool idea.  Not what I was talking about though.  What I meant was that the user could pull down a "compile" or "make" or "build" menu and choose what platform they want to generate an executable for.  Yes, crosscompiling support would also be nice.  Separate issue altogether, but still... cool thought.

A for your list of steps.. I've already done steps one and 3, and both step 2s. Step 4 is why I decided to post the results of the other steps here.  :)

I agree with you.  Better to take action than to simply wish.  Much better.  Currently, I'm not in a position to take a more active role than I am already taking, for several reasons, but hopefully my input here will have some motivating force or at least be unique enough to give other people who have been actively involved in the development of D something "different" to think about.

As for myself, I have picked a target project to write as I learn the D language, and I'm satisfied with my choice... at this time.

TZ

"Thomas Kuehne" <thomas-dloop@kuehne.thisisspam.cn> wrote in message news:ads1j2-5t6.ln1@lnews.kuehne.cn...
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> TechnoZeus schrieb am Thu, 14 Apr 2005 04:31:09 -0500:
> > Adding the ability to have the compiler treat a missing main function
> > declaration as an implication that the first line of the unenclosed code
> > is the program's entry point and that reaching the end of the program
> > returns 0, might require a little more integration between the ideas of
> > compiling and linking, but again wouldn't change any existing programs,
> > and would make it easy for someone learning the language to write very short
> > practice programs to test their understanding of how the parts of it work.
>
> Consequence: Compiling would dependend on the order of the source files given - that's troublesome.
>
> > Adding the ability to let the compiler recognize a program as being written for a specific environment and save the programmer the trouble of specifying such details as how to link it would still allow overriding of that default functionality, but would again make it easier for a beginner to learn.
>
> An example please.
>
> > Adding long filename support to the compiler
> Just tested it and had no problems with a long(267 character) file name.
>
> >  and the ability to have it look in default relative paths for files
> > that are commonly needed to compile and link a program wouldn't break
> > any existing functionality, if done right, but would make the compiler
> > that much easier to use... especially for beginners.
>
> Have a look at dmd/sc.ini dmd/dmd.conf.
>
> > Adding a graphical user interface that allows the source code to be edited, and run with transparent compiling and linking for the operating system it's installed on, would make D as easy to use as an interpreted language, but without removing any of it's current advantages.
>
> That the job of an IDE(editing) or of an VM(interpreted) not the compiler.
> Ofcoure the VM(in the broad sence) could be integrated into the IDE and
> closely interact with the compiler.
>
> > That same graphical interface could have menu options for compiling and linking to other platforms.
>
> Crosslinking is non-trivial. Adding crosscompiling to DMD should be fairly easy.
>
> > I see no down side to any of this, except the following:  None of it will happen without a lot of work going into it.
>
> I'm sure you know what I'm going to say:
>
> 1) analyse the situation, shortcommings, desires etc.
> 2) have a vision
> 2) analyse available capabilities/resource
> 3) set a target
> 4) aquire required capabilities/resource
> ...
>
> > So, what it comes down to is a simple question of what's worth the effort it would take, and what isn't.  I think the key to it is colaboration, but can this be accomplished to a sufficient degree?
>
> If you dont start a project or join an existing to fulfill your vision you wont reach your target.
>
> In case you lack the capabilities I'm sure there peoples you could encourage and/or bribe into helping you.
>
> Thomas
>
>
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFCXkKK3w+/yD4P9tIRAvNjAJ9xlakIFwarrYVwPqEzVelMlPfAEQCgjfxE
> VLHYBcpd3ujKkzWeg73bXDI=
> =i/0B
> -----END PGP SIGNATURE-----


April 14, 2005
Actually, in the C community, it's pretty much politically correct, and generally well accepted... but it's also what killed the momentum that the computer industry once had.  We could get that momentum back... but not if the attitude of "only serious programming is important" is so pervasive that poeple are discouraged from learning to "enjoy" programming.

TZ

"Georg Wrede" <georg.wrede@nospam.org> wrote in message news:425EDA0C.1090604@nospam.org...
> James Dunne wrote:
> >> I would like to see it simplified first because it would be better that way and I'm all for making it better, and second because it would mean that more people could learn the language who might not otherwise.
> >
> > Not to sound arrogant or anything... but people that could learn the language better with an implied main function are just the people we don't want programming in the first place.
>
> I actually don't like this being said out aloud.
>
> BUT, I REALLY DO AGREE HERE!
>
> > There, someone finally said it :-P.  I, for one, am tired of looking at code written by bad programmers.  Dumbening (thanks Lisa Simpson) languages up is not going to help make better coders - just more bad/mediocre ones.
> >
> > It's almost akin to saying "lets remove all prepositions from English to make it easier for dumber kids to speak it."  What does this do to the overall quality of the English language (as if it was ever that great to begin with)?  The result:  we're all talking like morons.
>
> That is gravely Politically non-Correct.  :-)
>
> But the fact remains. A serious language is for serious work. And that gets disturbed if the, er, wrong kind of people populate our cubicles /en masse/.
>
> And hey, there is always VB for them. :-(
>
> I've talked with quite a few programming language teachers, at university level. Most of them confess, that the first few weeks they go on like madmen, in order to get the weaker students to quit early. That leaves more energy and time to spend on those who really do have a chance of learning the stuff. Sad to say. But I feel everybody gains here. Even those who got "ousted", because then they can concentrate on other classes that better suit their talent.
>
> -----
>
> That said, of course D (or any good language) should be easy to use, and
> be designed to not cause unnecessary work or problems (as opposed to C++).


April 15, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

TechnoZeus schrieb am Thu, 14 Apr 2005 16:12:44 -0500:
> Okay, you wanted an example?
>
> version (Windows)
> {
>  MessageBoxA(null,"click OK to continue","message_box",MB_OK);
> }
>
> save as pausok.d and compile with
> DMD pausok
>
> In the current version, that wouldn't even compile... but it wouldn't take a lot of changes to make it so that it would.
<snip>

Anyone care to demonstrate that by patching GDC?

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCX4WW3w+/yD4P9tIRAg8XAJ4qvlpnYv8txgMM4WVIo5COKVKskwCgjgeK
PbFbOo77O+7r/KmoxI5x8Rw=
=bh/f
-----END PGP SIGNATURE-----
April 15, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[cross post & followup to digitalmars.D.bugs]

TechnoZeus schrieb am Thu, 14 Apr 2005 16:12:44 -0500:
> You tested what? I'm not talking about long filenaes support in the language here.
> I'm talking about the Digital Mars D compiler itself.  Sorry it I was ambiguous.
> Try compiling a file named longfilename.d and you will get an error to the
> effect of "C:\DM\TEST\LONGFI~1.D: module LONGFI~1 has non-identifier
> characters in filename, use module declaration instead".
>
> At least, that's what happens in Windows 98.  Maybe on another operating system this is not the case.  The inability to compile at all is probably the "~" character being used in the MS_DOS short filename that Windows is automatically generated by the operating system for the benefit of programs that only support <= 8 character long filenames with <= 3 character extensions.  The DMD compiler apears to be one of those programs.

Seems to be Windows specific.

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCX4aC3w+/yD4P9tIRAjytAKCxAwTmWD44LNjRRLj2nqrUMe3FogCgw32n
CWtvJNnASveJLKpHVdA+H+I=
=zN22
-----END PGP SIGNATURE-----
April 15, 2005
"Thomas Kuehne" <thomas-dloop@kuehne.thisisspam.cn> wrote in message news:m5d4j2-g75.ln1@lnews.kuehne.cn...
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> TechnoZeus schrieb am Thu, 14 Apr 2005 16:12:44 -0500:
> > Okay, you wanted an example?
> >
> > version (Windows)
> > {
> >  MessageBoxA(null,"click OK to continue","message_box",MB_OK);
> > }
> >
> > save as pausok.d and compile with
> > DMD pausok
> >
> > In the current version, that wouldn't even compile... but it wouldn't take a lot of changes to make it so that it would.
> <snip>
>
> Anyone care to demonstrate that by patching GDC?
>
> Thomas
>
>

That would be great.  I would, if I had the time, but I'm doing all I can as it is just to be involved in here at all.

By the way, I found a good example at file:///F:/dmd/html/d/sdwest/page1.html

<quote>

int main()
{
  printf("hello world\n");
  return 0;
}

</quote>

Notice that there is no "..." anywhere indicating snipped or missing lines.  It is presented as a complete, working "Hello World" program... but it won't compile, because even though most D programmers probably already know from C what needs to be imported or included to make it work, the DMD compiler doesn't.

TZ


April 15, 2005
"Thomas Kuehne" <thomas-dloop@kuehne.thisisspam.cn> wrote in message news:m5d4j2-g75.ln1@lnews.kuehne.cn...
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> TechnoZeus schrieb am Thu, 14 Apr 2005 16:12:44 -0500:
> > Okay, you wanted an example?
> >
> > version (Windows)
> > {
> >  MessageBoxA(null,"click OK to continue","message_box",MB_OK);
> > }
> >
> > save as pausok.d and compile with
> > DMD pausok
> >
> > In the current version, that wouldn't even compile... but it wouldn't take a lot of changes to make it so that it would.
> <snip>
>
> Anyone care to demonstrate that by patching GDC?
>
> Thomas
>
>

That would be great.  I would, if I had the time, but I'm doing all I can as it is just to be involved in here at all.

By the way, I found a good example at file:///F:/dmd/html/d/sdwest/page1.html

<quote>

int main()
{
  printf("hello world\n");
  return 0;
}

</quote>

Notice that there is no "..." anywhere indicating snipped or missing lines.  It is presented as a complete, working "Hello World" program... but it won't compile, because even though most D programmers probably already know from C what needs to be imported or included to make it work, the DMD compiler doesn't.

TZ



April 15, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

TechnoZeus schrieb am Fri, 15 Apr 2005 06:12:40 -0500:
>
> By the way, I found a good example at file:///F:/dmd/html/d/sdwest/page1.html

Please hand over your harddisk!

><quote>
>
> int main()
> {
>   printf("hello world\n");
>   return 0;
> }
>
></quote>
>
> Notice that there is no "..." anywhere indicating snipped or missing lines.
>  It is presented as a complete, working "Hello World" program... but it won't
> compile, because even though most D programmers probably already know from
> C what needs to be imported or included to make it work, the DMD compiler doesn't.

Have you actually tired to compile the source above?

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCX6Td3w+/yD4P9tIRArsGAKDQT9c70wELVm0xlfPS1LZcRSnvUwCgu1KM
yAMLm25GRxhcH20xOPe1kSs=
=Rq9f
-----END PGP SIGNATURE-----
April 15, 2005
TechnoZeus wrote:

> By the way, I found a good example at file:///F:/dmd/html/d/sdwest/page1.html

You mean the page at http://www.digitalmars.com/d/sdwest/index.html

> <quote>
> 
> int main()
> {
>   printf("hello world\n");
>   return 0;
> }
> 
> </quote>
> 
> Notice that there is no "..." anywhere indicating snipped or missing lines.
> It is presented as a complete, working "Hello World" program...

It does compile alright? Unfortunately. I don't think it's very good...

A better introduction would be:

import std.c.stdio;
import std.c.stdlib;

int main()
{
  printf("Hello, World!\n");
  return EXIT_SUCCESS;
}

Or, perhaps more modern:

import std.stdio;

void main()
{
  writeln("Hello, World!");
}

Second program assuming that "void main" and "writeln" gets fixed/added.

--anders

April 15, 2005
Hahaha.  Oops.... that's the address of the local copy that I made so I could read it off line.  Phone modem connection here.

Okay, here's the "correct" address...

http://digitalmars.com/d/sdwest/page1.html

Sorry about that.

TZ

"Thomas Kuehne" <thomas-dloop@kuehne.thisisspam.cn> wrote in message news:uvk4j2-gtl.ln1@lnews.kuehne.cn...
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> TechnoZeus schrieb am Fri, 15 Apr 2005 06:12:40 -0500:
> >
> > By the way, I found a good example at file:///F:/dmd/html/d/sdwest/page1.html
>
> Please hand over your harddisk!
>
> ><quote>
> >
> > int main()
> > {
> >   printf("hello world\n");
> >   return 0;
> > }
> >
> ></quote>
> >
> > Notice that there is no "..." anywhere indicating snipped or missing lines.
> >  It is presented as a complete, working "Hello World" program... but it won't
> > compile, because even though most D programmers probably already know from
> > C what needs to be imported or included to make it work, the DMD compiler doesn't.
>
> Have you actually tired to compile the source above?
>
> Thomas
>
>
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFCX6Td3w+/yD4P9tIRArsGAKDQT9c70wELVm0xlfPS1LZcRSnvUwCgu1KM
> yAMLm25GRxhcH20xOPe1kSs=
> =Rq9f
> -----END PGP SIGNATURE-----