Skip to content

glenkleidon/functionalDemo

Repository files navigation

functionalDemo

Demo of Functional Programming approach for Delphi

Purpose

This repo has been created for the purposes of showing how an existing Delphi project can be refactored using some of the Functional principles. Be Warned - this is a work in progress and at this stage, the code does not represent true functional programming: it barely scratches the surface of some of the concepts.

Applying the Crumbs

At this stage this code and notes can at best be described as the crumbs of the functional programming approach. This project is largely inspired by the Functional programming principles course for C# I did on Plural Sight by Vladimir Khorikov

As C# is in many ways the daughter of Delphi, it seems reasonable that this course could easily be applied to Delphi code. In practice there a some difficulties - particularly with respect to ensuring that intermediate objects are freed and dont leak memory. Using records is the simplest way to do this, but interfaces can also be used and there is a comparison of the two approaches at steps 3b and 3c.

Vladimir's course which is proported to be about functional programming principles in truth it only touches on some of the more significant components. However this is actually fine as there are definite benefits for OO programming by adopting the approaches described in that course.

So I think that at this stage, this project represents just the crumbs of functional programming that can be applied immediately to traditional OO projects and as time goes on, the repo will include more and more functional principles and perhaps be more worthy of the Title of "Functional Programming"

About

Demo of Functional Programming approach for Delphi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages