0% found this document useful (0 votes)
20 views7 pages

CH 01

Uploaded by

skamelrech2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views7 pages

CH 01

Uploaded by

skamelrech2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

begin - 1

begin

To my family, Raffaella, Benedetta, and Jacopo,


with all of my love and a big thank you for all you do
to take my life ahead of my expectations

Power and simplicity, expressiveness and readability, great for learning and for pro-
fessional development alike, these are some of the traits of today's Object Pascal, a
language with a long history, a lively present, and a brilliant future ahead.
Object Pascal is a multi-faceted language. It combines the power of object-oriented
programming, advanced support for generic programming and dynamic constructs
like attributes, but without removing support for more traditional style of proce-
dural programming. A tool for all trades, with compilers and development tools
embracing the mobile era. A language ready for the future, but with solid roots in the
past.
What is the Object Pascal language for? From writing desktop apps to client-server
applications, from massive web server modules to middleware, from office automa-
tion to apps for the latest phones and tablets, from industrial automatation systems
to Internet virtual phone networks... this is not what the language could be used for,
but what it is currently used for today, in the real world.
The core of the Object Pascal language as we use today comes from its definition in
1995, a terrific year for programming languages, given that this was the year Java

Marco Cantù, Object Pascal Handbook


2 - begin

and JavaScript were also invented. While the root of the language dates back to its
Pascal ancestor, its evolution didn't stop in 1995, with core enhancements continu-
ing as of today, with the desktop and mobile compilers build by Embarcadero
Technologies and found in Appmethod, Delphi, and RAD Studio.

A Book on Todays' Language


Given the changing role of the language, its extension over the years, and the fact it
is now attracting new developers, I felt it important to write a book that offers com-
plete coverage of the Object Pascal language as it is today. The goal is to offer a
language manual for new developers, for developers coming from other similar lan-
guages, but also for old timers of different Pascal dialects that want to learn more
about recent language changes.
Newcomers certainly need some of the foundations, but given changes have been
pervasive even old-timers will find something new in the initial chapters.
Beside a short Appendix covering the short history of the Object Pascal language,
this book was written to cover the language as it is today. A large part of the core fea-
tures of the language hasn't changed significantly since the early versions of the
Delphi, the first implementation of modern Object Pascal in 1995.
As I'll hint throughout the book, the language has been far from stagnant during all
of these years, it has been evolving at quite a fast pace. In other books I wrote in the
past, I followed a more chronological approach, covering classic Pascal first, and fol-
lowing extensions more or less as they appeared over time. In this book, however,
the idea is to use a more logical approach, progressing through the topics and cover-
ing how the language works today, and how to best use it, rather than how it evolved
over time.
As an example, native data types dating back to the original Pascal language have
method-like capabilities (thanks to intrinsic type helpers) introduced recently. So in
Chapter 2 I'll introduce how to use this feature, although it won't be until much later
than you'll figure out how to make such custom type extensions.
In other words, this book covers the Object Pascal language as it is today, teaching it
from the ground up, with only a very limited historical perspective. Even if you have
used the language in the past, you might want to skim thought the entire text look-
ing for newer features, and not focus only on the final chapters.

Marco Cantù, Object Pascal Handbook


begin - 3

Learn by Doing
The idea of the book is to explain core concepts and immediately present short
demos that readers are encouraged to try to execute, experiment with, and extend to
understand the concepts and assimilate them better. The book is not a reference
manual, explaining what the language should do in theory and listing all possible
corner cases. While trying to be precise, the focus is more on teaching the language
offering a practical step-by-step guide. Examples are generally very simple, because
the goal is to have them focused on one feature at a time.
The entire source code is available in a subversion repository, rather than a down-
load file, so that you can easily update your code in case I publish any changes or
additional demos. You can use any subversion client (my personal preference on
Windows is for TortoiseSVN) and point it to the following HTTP URL to get all of
the demos of the book (alternatively you can also check out individual chapters):
http://code.marcocantu.com/svn_public/marcocantu_objectpascalhandbook
The repository source code can also be browsed online by selecting the “Browse” link
in the code repository wiki page at:
http://code.marcocantu.com/trac/marcocantu_objectpascalhandbook
To compile and test the demo code, you'll need one of the available versions of the
Object Pascal compiler, and possibly a recent one to compile them all. There are trial
versions available that you can use, generally allowing you 30-days free use of the
compiler.

A Companion Web Site


The book has a companion web site with further information, links, updates and
more. There are both a static, traditional site with information at:
http://www.marcocantu.com/objectpascalhandbook
and online pages on Google+ (using a bit.ly link) and Facebook at
http://bit.ly/objectpascalgplus
https://www.facebook.com/objectpascalhandbook

Acknowledgments
As any book, this volumes owes a lot to many people, too many to list one by one.
The person who shared most of the work on the book was my editor, Peter Wood,

Marco Cantù, Object Pascal Handbook


4 - begin

who kept bearing with my ever changing schedule and was able to smoothen my
technical English very significantly as usual, helping to make this book (like my pre-
vious handbooks) what it is.
Given my current work position as product manager at Embarcadero Technologies, I
owe a lot to all my coworkers and the members of the R&D team, as during my time
at the company my understanding of the product and its technology has further
increased thanks to the insight I've gained in countless conversations, meetings, and
email threads. Given how hard it is to make sure everyone is mentioned, I won't
really try, but only pick three people that for their role have had a direct input on
this book: David I of Developer Relations, John Thomas (JT) who's the head of
Development tools Product Management, and Chief RAD Studio Architect Allen
Bauer.
Other people outside Embarcadero continued being important contacts and at times
offering direct input, from the current group at Wintech Italia (Paolo and Andrea),
to the countless customers, Embarcadero sales and technical partners, Delphi com-
munity members, MVPs and even developers using other languages and tools I keep
meeting so often. If there is one person in this group I've spent a lot of time with,
prior to joining Embarcadero, this is Cary Jensen, with whom I've organized a few
rounds of Delphi Developer Days in Europe and the US.
And finally big thank you goes to my family for bearing with my travel schedule,
nights of meetings, plus some extra book writing on weekends. Thanks again Lella,
Benedetta, and Jacopo.

About Myself, the Author


I've spent most part of the past 20 years writing, teaching, and consulting on soft-
ware development with the Object Pascal language. I wrote the Mastering Delphi
best-selling series and later self-published several Handbooks on the development
tool (about the different versions from Delphi 2007 to Delphi XE).
I have spoken at a large number of programming conferences in most continents,
and taught to hundreds of developers at conferences, Delphi developer events,
classes hosted by companies, online webinars and CodeRage conferences.
Having worked as an independent consultant and trainer for many years, in 2013
my career took a sudden change: I accepted a position as Delphi and now RAD Stu-
dio product manager at Embarcadero Technologies, the company that builds and
sells these great development tools, along with the new Appmethod product.

Marco Cantù, Object Pascal Handbook


begin - 5

To avoid annoying you any further, I'll only add that I currently live in Italy, com-
mute to California, have a lovely wife and two wonderful kids, and enjoy getting back
to programming as much as I can.
I hope you enjoy reading the book, as much as I enjoyed writing it (my 19th work in
print). For any further information, use any of the following contact details:
http://www.marcocantu.com
http://blog.marcocantu.com
http://twitter.com/marcocantu
https://www.google.com/+MarcoCantu
http://www.facebook.com/marcocantu

Marco Cantù, Object Pascal Handbook


6 - begin

Marco Cantù, Object Pascal Handbook

You might also like