top | item 43053133

(no title)

janci | 1 year ago

I did not do many things in Delphi but I have studied the language and VCL architecture for the very purpose of determining why it is so aproachable and productive (as compared to C, Java, JS, Python and the tooling around them).

In my opinion, it is the result of following qualities:

1. The language direcly supports concepts needed for live WYSIWYG editing (i.e. properties and events) while other languages only simulate it by convention (i.e. Java Bean specification)

2. The language syntax is simple enough for the IDE to understand and modify programatically, but powerful. The properties files that define the forms are even simpler, support crucial features (i.e. references and hierarchy) but do not bring unecessary complexity as general-purpose formats do (XML files or JSON)

3. Batteries included - you can do very powerful stuff with the included components (gui, i/o, ipc, sql, tcp/ip, graphics - all the practical stuff) without hunting for libraries

4. Discoverability - the visual component paradigm with Property editor lets you see all your possibilities without reading the documentation.

5. Extensibility - you can build your own components that fully integrate with the IDE. This is my litmus test for low-code and RAD tools: For any built-in feature, can I recreate the same using the provided tools? Many tools fail this, and the built-in components can do things that are inaccessible to user-defined components.

6. Speed - both compilation and runtime, thanks to one-pass compilation and native code. Leads to fast iteration times.

7. The VCL component architecture is a piece of art. The base classes implement all the common functionality: They automatically manage memory, can store and load persistent state, have properties for visual placement (position, size) etc. The language features really help here (I remebmer something about interface delegation) but there is no magical runtime that does this from the outside, it's an actual implementation of the component that can be extended or overriden.

But of couse there are the ugly things as well: alien syntax, forward declarations, strict compiler blocking the Form Designer on any error preventing you to fix the very error and most of all: while there is very good abstraction for the components, there is none for data and state. There is no good tooling for data modelling and working with the data models. That leads to poor practices as having state in the visual components or in global variables.

discuss

order

askvictor|1 year ago

I've often compared Anvil (it's web-IDE for web-apps in Python https://anvil.works) to Delphi. I'm curious how you'd rate it on those qualities (off the bat it ticks a lot of those boxes