Hi Alf! Welcome!

On 2/12/2012 4:02 PM, Alf P. Steinbach wrote:
Hi

I just installed D 2.x.


* Improvement potential #1 -- installer description.

It was not clear to me that the first download is a full offline installer. In
ignorance I used the one that downloads from web. The web page can possibly be
mucho improved! :-)


* Improvement potential #2 -- Start menu link to help file.

It didn't work. Sorry I didn't check where it pointed, but it started searching
for some [index.html]. I found that file by manual searching, plugged it in
manual in the search that the link brought up, and all's well that ends well,
but this is DEFINITELY an improvement opportunity!


* Improvement potential #3 -- Linker executable name.

The name [link.exe] conflicts with Microsoft's linker. Please name it
[optlink.exe]. I just renamed it and fixed the options file, but this is not
just an improvement opportunity, it's more on the MUST end of the scale: it is
very impractical to have such a needless name clash.

Having clashes with programs from other vendors is a constant problem. Even having clashes with our own programs is, as people often wish to keep multiple versions installed.

This is why we switched away from relying solely on environment variables, such as PATH, to find the programs and set options. Instead, sc.ini is used:

  http://www.d-programming-language.org/dmd-windows.html#sc_ini

to set where the programs and libraries are to be found.


* Improvement potential #4 -- Standard options for tools.

Why have "-quiet" for the compiler and "-nologo" for the linker? Standardizing
options across the toolset is a very nice improvement opportunity.

That's a good idea. Optlink has several anachronisms in it due to it having a long history.


Also, it
would be nice if the linker refrained from reporting all about itself when it
encounters an error.

That's there so it's easy for users to cut&paste the error and also get the correct linker version, etc., when asking for help.


* Improvement potential #5 -- The description of Windows prog.

Following main site's links to [http://d-programming-language.org/windows.html],
I found a real monstrosity as an example of purportedly simplest possible
Windows GUI program. It's almost funny. Here is mine:

<code>
import std.c.windows.windows;

void main()
{
MessageBoxW( null, "Text", "Caption", MB_OK | MB_ICONINFORMATION );
}
</code>


And here is how I built it:


<example>
[d:\dev\test\d]
 > dmd minimal_gui.d -L-subsystem:windows

[d:\dev\test\d]
 > dumpbin /headers minimal_gui.exe | find /i "sub"
3.10 subsystem version
2 subsystem (Windows GUI)

[d:\dev\test\d]
 > minimal.d
</example>


Maybe with DMD tools something potentially bad happens here. However, with
extant C++ compilers (and even old Borland C++ 5.5) this way of doing things
works splendidly. So here is a definite improvement potential for the web site
page with the monstrous code, and if the current tools don't handle it well,
also for the the toolset. :-)

Good point, the Windows examples get less love than the other stuff. On the other hand, I don't think a simple main()/MessageBoxW() program scales as a first program. It needs to be a WinMain(), and it needs to show how to get a classic GUI program started up and shut down. The user can then start hanging flesh on it for his own purposes.


- Alf (at very beginning of checking out the D language)

Thanks for taking the time to post these first experiences. It's often hard for use to see the picture in the way a new user does.

Reply via email to