General
Installation
Available on CD-ROM or floppies. Standard Borland install program with no particular surprises.
Documentation
The Windows SDK documentation is all provided on-line only. These help files appear to be based on Microsoft’s API help files but I found them easier to navigate from the contents and master index.
Hard copy documentation includes the usual Users Guide, Run time library, the C++ language and DOS specifics as well as a good guide and reference for OWL.
System requirements
An 8 Mb machine with plenty of hard disk space is needed, you really want a high resolution display and fast graphics
I.D.E.
Editor
The text editor is a joy to use. Just about everything that could be configured can be. Options for syntax highlighting include bold and italic characters as well as the usual choice of colours. A nice feature is the margin shown by default at 80 columns, indicating the edge of a printout.
Unlike Microsoft’s editor this one combines keystrokes to give faster scrolling on slower machines.
Workspaces
This concept isn’t supported.
Project system
Impressively flexible, control of compile options for each file if required. Some options such as ’link’ only appear to be available via the right mouse button.
A project can now have multiple targets which while achieving nothing new at least keeps everything in one place.
Unlike Microsoft you can have help compiler projects as part of a project.
Browser
Does much the same job as Microsoft’s offering, the main difference being that it relies on debug and browsing information in the executable rather than in separate files. I found the interface to be a bit fussy but it does its job well.
As with other I.D.E. components heavy use is made of the right mouse button and the tool bar but not the main menu.
Integrated Debugger
There is little to say here except that it works well enough that you’re unlikely to need Turbo Debugger for most jobs.
Resource Workshop
Surprisingly this seems slightly less integrated than Microsoft’s product except when working on an AppExpert generated project. It doesn’t seem to be up to the presentational standard of the IDE but it works quite competently.
Experts
Probably the best way to construct OWL applications is to use the OWL specific tools provided.
APPEXPert
Builds a skeleton for an OWL application, very much like the Microsoft equivalent. I sometimes wonder whether these products were designed with the purpose of creating spectacular first impressions rather than being a generally useful tool.
Class Expert
Does the same job as the Microsoft wizard except that the editing area is part of a split window and it makes use of the right mouse button. It is OWL specific and is only available within the I.D.E.. By starting Resource Workshop from within Class Expert you can build the connections between data and controls interactively.
Compiler (and Linker)
Performance
This is a quick compiler which is fortunate as it doesn’t have the ability to run in the background. It will sometimes stop with an error when trying to multi-task with other Windows applications. Generated code size is rather large, generally slightly fatter than that created by its predecessor.
Optimisation has less proportional effect on size than with MSVC but doesn’t seem have any detrimental effects.
C++ language implementation
With templates having been available from Borland for some time, they have now added exceptions, new style casts and run time type identification (RTTI).
These features do add some library code and make applications rather larger.
Exceptions
These provide a formal built in way of handling error conditions such as memory allocation failure.
Exceptions are too complex to discuss in depth here but even if you do nothing to handle them there is one massive advantage.
Under the previous scheme of things if your program terminates other than by unwinding the stack in an orderly fashion, only the static destructors are called. Any automatic object’s destructors won’t be called, leaving you with data loss or worse.
Now you can expect all destructors too be called on the way back up the stack to the point where the exception is ’caught’. So long as critical objects are declared on the stack rather than dynamically your code becomes instantly safer. If this isn’t good news I don’t know what is!
Exceptions cannot be used with overlaid DOS programs, presumably the stack isn’t wide enough for all the walking up and down it!
RTTI
This feature formalises something which otherwise is quite tedious to achieve in source code. The most obvious use is in object persistence.
Casts
The new style casts provide potentially greater type safety. The range of special casts are mainly more restricted in what they can do. The new dynamic_cast gives type safe casting of polymorphic pointers and references and relies on RTTI to check validity. This will probably have an impact on coding techniques and I think could be very interesting.
Library additions
A standard string class has been added. There are various library functions (including string members) associated with the exceptions and RTTI extensions which you will find added to your executable if you use them.
Object Windows Library V2.0
OWL provides a class library interface to Windows which is easier to use and more powerful than the ’C’ API. As always with these things a certain amount of extra baggage comes with it but because use is made of the new language features it is rather cleaner to read that MFC.
Even more than Microsoft, Borland seem quite happy to use public and protected data members which will upset the purists.
OWL makes much use of multiple inheritance in its quite complex class hierarchy. It is expected that multiple inheritance may be used by the client programmer. For example a class could derive from TView and a window class or just contain a window class, whereas in MFC a view class is a window class.
Because OWL takes advantage of the new language features, it is much ’cleaner’ in appearance than MFC. It is a realistic approach to ignore the ‘Experts’ and edit your code directly if you prefer.
Events are handled via response tables which are built with macros not unlike those used in MFC. Handler functions are no longer declared virtual as in V1.0.
Because they are built on different foundations OWL 1.x programs are totally incompatible with V2.0, however there is a utility provided which will do much of the work needed.
Full library source code is provided for the curious.
Other Tools
All the usual stuff is there including the external debugger. These are all pretty good!
In Summary
Borland have taken a big step forward in their implementation of the latest C++ language features, given their support for Win32s in one package and their presence on other platforms their current offering is very attractive and real value for money.
Microsoft have the edge in terms of efficiency and you may want to stay with them simply because Microsoft compilers are so widely used professionally. Additionally ODBC looks very good at first acquaintance and may make the package very attractive to database oriented developers.
Given the limitations of the 4GLs out there right now, C++ could become increasingly important in database work. Borland do supply other relevant database products and there are third party libraries to consider, so both compilers are strong contenders.
Adrian Fagg
In the mean time we will continue to use both products in the hope that Microsoft will catch up on language features and Borland support tiled bitmaps and compile smaller code.