Fog Creek Software
Discussion Board

Language suggestions

For some time I've had the luxury of being able to do most of my development in Delphi, although I've recently learned Java and C# and used each of those for a handful of projects.

I've been very impressed with the productivity I seemed to gain using Java or C# (especially in VS.NET - wow!), but lately I've run into a few situations where a plain old Win32 application is really the best solution.

Here's my question.  Is there some language and/or development environment that gives me an equivalent productivity level to Java or C# (preferably with {}-style syntax) that can do Win32 programs?  I'd like to find something in between the verbosity of Delphi or VB and the complexity of C++.

Thursday, May 22, 2003

Can you please elaborate on these particular situations causing you to need a more Win32 friendly programming environment? You'll be surprised what some of the popular and new languages can do in the integration department.

Li-fan Chen
Thursday, May 22, 2003

I think what "Whapow!" probably means is a single compiled Windows executable that does not depend on any separately downloaded or installed runtimes, frameworks, virtual machines, etc - so that the application can be "installed" simply by copying the executable to a new machine.

Philip Dickerson
Thursday, May 22, 2003

Well, Delphi would be my obvious choice for a plain old Win32 application. I can't for the life of me see why verbosity would be a problem.

Big B
Thursday, May 22, 2003

Learn C++. Win32 is your friend.

Thursday, May 22, 2003

GCJ from the GNU Compiler folks can do ahead of time (AOT) compilation of Java source, resulting in binaries and dlls you can bundled with InstallShield or whatever. I am not certain that this project is at a stage where you can just compile every possible Java source without problem.

I am not sure if Microsoft has an in-house AOT compiler for C# (which is crucial, because so much of dot net uses C#) so I can't defend dot net's ability to generate traditional binaries. The mono folks are talking about AOT for their C# compiler though, so maybe that's something to watch.

Most AOT compilers for Java are either research or incredibly pricy. I am not sure you have any choice but to stay away from both solutions if that's what you need.

The eclipse project donated(?) by IBM aims has as a part of it a GUI Library to provide Java folks native Windows GUI look.. as an alternative to Java Swing. There are talks of compiling this so that it works with GCJ. If you can bundle this as an accessible COM object (once GCJ compiles it into binaries) you could forseeably use something like Python or some other nice scripting language to access it. And then bundle that as a single executable. This is possible because some of the scripting languages support bundling just as Delphi will.

Li-fan Chen
Thursday, May 22, 2003


I've been looking for exactly the same thing for some time now.

Lingo looks interesting, but is still in very early stages:

Perhaps the author posts here, perhaps he could comment.  Do you plan Lingo as the language to deliver that Whapow is looking for? 

At the moment I'm using Purebasic for my Win32 needs. .  It's a no thrills Basic with no OO extensions whatsoever.  However, it compiles to incredibly tight, dependancy free, fast executables and is a breeze to code in.

I'm waiting for a language like Java/C# that delivers this type of executable.

Ged Byrne
Thursday, May 22, 2003

Microsoft's "Advanced Compiler Technolgy" group is building a compiler named Bartok that's eventually supposed to compile IL to native code:

However, there's no timetable, no downloadable code, and the page was last updated in 2001...

Chris Nahr
Thursday, May 22, 2003

You can't have it, because the increased productivity you experience with Java and C# is not because you save time typing "{" instead of "begin" , but because you are running in a managed environment (garbage collection, common namespace etc.). If you program for Win32, you loose that.

If the reason you want to program for Win32 is that you don't want the runtime pre-installed, at least the Java runtime can be bundled in a jre subdirectory and a bootstrapper .exe can be compiled.

Roland Kaufmann
Thursday, May 22, 2003

Thanks, Roland, for saying what I missed. ;)

It is a deceptive idea to think that the syntax of the language means much of anything.  I've come to believe that a relatively terse C-like syntax is a benefit simply because {'s are clearer than begin's and because += styled operators when used relatively conservatively is about as terse as you can get with the ASCII character set without giving maintenence coders a headache.

C++ code can be as complicated or as simple as you want.  Writing a good C++ library is hard.  Using a good C++ library is easy and plesant.  The problem is that it took people years before enough C++ ideas were developed (Design Patterns, template metaprogramming, STL, various idioms, etc) to make a quality idea and the compilers developed enough to catch up, so most common libraries like MFC are, at best, half baked C++ libraries.

Pretty much, your selection in mainstream languages for Windows is VB, C#, C++, C, and Java (and sometimes Perl and Python).  Anything else is going to give you fits because not enough other folk use it, it's not popular enough to make keeping it up to date with the windows API profitable, or just isn't very good.  You can always try Eiffel, but I have no idea if they are blowing smoke about the C compatability.  So choose and don't sweat about it too much, because every programming language and system is either prone to being complicated, or is too limiting.

Flamebait Sr.
Thursday, May 22, 2003

"...I am not sure if Microsoft has an in-house AOT compiler for C#..."

I'm not sure what you're after here, specifically (since my Java skills are near zero). If you want a runtime-less deployment, no, there's no comparable equivalent. If you simply want something that won't have to be JITted, you can use the NGEN utility that ships with the platform to pre-JIT your code (regardless of what language it was written in, actually).

However, the IL still needs to be deployed. The metadata is not put into the NGEN'd exectable. Also, if some dependency has changed (some library gets upgraded after the NGEN), then the NGEN image becomes invalid and the system will ignore it and JIT from the IL as per normal.

IMO, Microsoft should dump the explicit NGEN system sometime in the future in favor of JIT-caching to disk.

Brad Wilson (
Thursday, May 22, 2003

JIT-caching to disk, after all, is what the AS/400 did since day one. 

You can take a pre-PowerPC AS/400, pull the drives out, put them in a PowerPC AS/400, and it will transparently re-compile the bytecoded applications and then store them to disk, without you even needing to think about it.

There's some really great thought put into the AS/400 and it would be good if MS would steal that. ;)

Flamebait Sr.
Thursday, May 22, 2003

I would recommend Lisp (especially the Scheme dialect) as a learning experience. It changed the way I thought about programming.

Neil Bloh
Thursday, May 22, 2003

"It is a deceptive idea to think that the syntax of the language means much of anything."

The syntax is a substantial part of the "GUI" to the code, so I would say it is not irrelevant.

Just me (Sir to you)
Friday, May 23, 2003

For a twist, try REBOL. The SDK might be what you're looking for.

Lennart Fridén
Friday, May 23, 2003

Hi there

This is really an answer to Ged's question about two feet up the page.

I intended Lingo to be a compilable high level language so the answer is a qualified 'yes', it does most of what Whapow wants. Lingo compiles to a proper EXE file, it's not interpreted and there's no complex runtime. But there are some angles in which it's not ideal:

- It doesn't jam *everything* in the EXE, there are separate manifests, resource files and bitmap and icon files. These can all be put in one directory, though.

- Lingo has a library DLL, however this can also be put in the same directory as the EXE. The EXEs and DLLs are fully versioned to avoid DLL hell and framework hell.

- It uses "if ... end if" syntax instead of "if { ... }" syntax.

- You can't call the Win32 API directly. The idea is the language itself has all the commands you need, also I want to port it to Unix in the future. This may change in the face of customer demand :)

Anyway take a look at if you're interested. Also I had a look at the pure basic and I must say I'm impressed! Their site looks nice and the product looks good too. Time for me to redo my site...

Bill Rayer
Tuesday, May 27, 2003

PS: Languages and IDEs always annoy me when they require a major research project whenever you want to find what files need to be distributed. So in the Lingo IDE I put a View-Output files command which shows this

Bill Rayer
Tuesday, May 27, 2003

*  Recent Topics

*  Fog Creek Home