Delphi programming language

Delphi is a programming language and Integrated Development Environment (IDE). It is produced by Borland (known for a time as Inprise). The Delphi language, formerly known as Object Pascal (Pascal with object-oriented extensions) originally targeted only Microsoft Windows, but now builds native applications for Linux and the Microsoft .NET framework as well (see below).

Contents

Development Environment

Main article: Borland Delphi

Programming language

The main distinguishing features of Delphi and Kylix from other IDEs are the Delphi language, the VCL/CLX (Visual Component Library), strong emphasis on database connectivity, and a large number of third party components.

Notable aspects of the Delphi language include:

  • Transparent handling of objects as references/pointers
  • Built-in managed types like strings, dynamic arrays, variants, and interfaces
  • Properties as part of the language; that is, member getters and setters (aka accessors and mutators), which transparently encapsulate the access to member fields
  • Index Properties and Default Properties to provide access to collections
  • Delegates aka type safe method pointers which are used to wire the events triggered by the components
  • Delegation of interface implementation to a field or property of the class
  • Implementation of Windows message handlers by tagging a method of a class with the number/name of the windows message to handle
  • COM independent interfaces with reference counted class implementations

Pros and cons

Delphi exhibits the following advantages:

  • Rapid Application Development (RAD).
  • Based on a well-designed language.
  • A large community on Usenet and the web (e.g., news://forums.borland.com and Borland's web access to Delphi newsgroups).
  • Can compile to a single executable, simplifying distribution and reducing dll versioning issues.
  • Many VCL and third-party components (usually available with full source code) and tools (documentation, debug tools, etc.).
  • Quick optimizing compiler and ability to use assembler code.
  • Multiple platform native code from the same source code.
  • High level of source compatibility between versions.
  • CrossKylix - a third-party toolkit which allows you to compile native Kylix/Linux applications from inside the Windows Delphi IDE, hence easily enabling dual-platform development and deployment.
  • CrossFPC - a sister project to CrossKylix, which enables you to cross-compile your Windows Delphi applications to multi-platform targets - supported by the Free Pascal compiler - without ever leaving the Delphi IDE.

The following are disadvantages:

  • Partial single vendor lock-in (Borland alone can set the language standard, the compatibles have to follow).
  • Limited cross-platform capability for Delphi itself. Compatibles provide more architecture/OS combinations.
  • Access to platform and third party libraries require header files to be translated to Pascal.
  • Documentation of platforms and techniques hard to find in Pascal language (e.g., access to COM and WIN32).
  • Persistent doubts about the long-term future of Borland have made its products seem too much of a risky proposition for many employers, leading to shrinkage of the job market for Delphi programmers.

Interesting facts:

  • The largest software manufacturer in the world, Microsoft, chose the chief programmer of Delphi, Anders Hejlsberg, to develop the successor, C#, to the most popular programming language in existence, C++.

Clones and alternatives

While not being a direct substitute for the entire product Delphi itself, there are a number of efforts that strive to be more or less language compatible and take Delphi code to places where Delphi and Kylix itself can not reach.

These can get Delphi code running in ways not possible with Delphi (such as supporting different operating systems, free distribution and educational use, and allowing examination of the compiler source) and allow for some vendor independence. These are generally used educationally and to get the server parts of Delphi apps running on non-mainstream operating systems; most had Linux support years before Kylix.

  • Bloodshed Dev-Pascal A very polished graphical 32-bit Windows editor (though not RAD) as a frontend for both GNU Pascal and Free Pascal.
  • Free Pascal A commandline compiler that aims source compatibility with the core feature set of both the Turbo Pascal and Delphi dialects. The current version is 2.0(.0), which are highly Delphi6/7 compatible. Operates on most x86 operating systems. Supports Linux, Mac OS and Mac OS X (including an Xcode implementation) on PowerPC family, and Linux on AMD64. SPARC and Acorn RISC Machine (ARM) architectures are working and formally released but not 100% end-user ready yet.
    • Lazarus [1] is an effort to build a RAD on top of Free Pascal. The internal classes hierarchy can base itself on several graphical toolkits. The main toolkits are GTK1 and Win32, and GTK2 has already come a long way. Occasionally people want Qt and wxWidgets, but an apparent lack of interest prevents the implementation of these toolkits.
    • CrossFPC - a free toolkit to integrate the Free Pascal compiler, targetting various OS and hardware platforms, into the Windows Delphi IDE. See more about it from this mailing list discussion.
  • GNU Pascal (Separately distributed part of the GNU Compiler Collection) While formally not aimed at the Borland dialects of Pascal, it does contain a Borland Pascal compatibility mode, and is very slowly absorbing Delphi language features, though not yet directly suitable for recompiling large bodies of Delphi code. It is the most prolific compiler in terms of operating systems and processors though, and therefore deserves mentioning as a last resort.
  • InnerFuse is a Delphi interpreter for embedding in applications. It is rumoured to work with several of the alternatives too.
  • OpenSibyl is another effort to build a RAD on top of Free Pascal. However it is geared towards OS/2, and still in initial stages.
  • Vector Pascal Vector Pascal is a language targeted at SIMD instruction sets such as the MMX and the AMD 3d Now, supporting all Intel and AMD processors, as well as the Sony Playstation 3 Emotion Engine.
  • Virtual Pascal is a x86 32-bit Turbo Pascal and Delphi compatible compiler mainly aimed at OS/2 and Windows, though it developed a DOS+Extender and an experimental Linux cross-compiler too. The compiler is stuck on the level of about Delphi V2, and the site hasn't changed significantly in two years, and development of Virtual Pascal has stopped. Nevertheless, of the free alternatives, it is still the one with the best polished IDE and debugger though Free Pascal is getting nearer and nearer.
  • WDOSX is a Win32 API-emulating DOS extender that can be used to get Delphi console applications running on plain DOS.
  • Winsoft Pocket Studio aims to compile stripped down Delphi code to PDAs.

Documentation

Delphi Developer documentation from Borland:

More from Delphi Developer Support section (FTP archives).

External links

Major programming languages (more) (edit)

Industrial: ABAP | Ada | AWK | Assembly | C | C++ | C# | COBOL | Common Lisp | Delphi | Eiffel | Fortran | Java | JavaScript | Lisp | Magik | Objective-C | Pascal | Perl | PHP | PL/SQL | PowerBuilder | Python | Ruby | SAS | Smalltalk | Tcl | Visual Basic | VB.NET | Visual FoxPro

Academic: APL (historical dialect)/J | Haskell | Logo | ML | Prolog | Scheme

Historical: ALGOL | BASIC | Clipper | Modula-2/Modula-3 | MUMPS | PL/I | Simula

ar:دلفي

bg:Delphi cs:Delphi da:Delphi de:Delphi (Programmiersprache) es:Lenguaje de programación Delphi fr:Delphi ko:델파이 프로그래밍 언어 it:Delphi nl:Delphi (ontwikkelomgeving) ja:Delphi pl:Delphi ro:Delphi (limbaj de programare) ru:Delphi sk:Delphi (programovací jazyk) fi:Delphi sv:Delphi (programspråk) zh:Delphi