# Delphi

> Delphi Object Pascal for Windows applications. Use for .pas files.

- Skill: `g1joshi/delphi` (Agent Skill)
- Install (CLI): `npx skillmds@latest add g1joshi/delphi`
- Raw SKILL.md: https://api.skillmd.com/api/skills/g1joshi/delphi/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: G1Joshi (https://skillmd.com/u/g1joshi)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/g1joshi/delphi

---


# Delphi / Object Pascal

Delphi (RAD Studio) and Free Pascal (Lazarus) keep Object Pascal alive. It is famous for **Single EXE** deployment and instant compilation.

## When to Use

- **Windows Desktop Apps**: The VCL framework is still the fastest way to build native Windows GUIs.
- **Legacy Maintenance**: Massive industrial controllers in Europe use Delphi.
- **Cross-Platform**: FireMonkey (FMX) and Lazarus allow targeting Mac/Linux.

## Core Concepts

### VCL / LCL

Visual Component Library. Drag-and-drop UI building.

### Units

`interface`, `implementation` sections. Strict modularity.

### RTTI

Runtime Type Information (Reflection) was pioneered here.

## Best Practices (2025)

**Do**:

- **Use Generics**: `TList<T>` (modern Object Pascal).
- **Use `Lazarus`**: For open-source cross-platform development (Free Pascal 3.2+).
- **Manage Memory**: Use `try..finally` blocks for `Free`.

**Don't**:

- **Don't use `With`**: It makes scoping ambiguous.

## References

- [Free Pascal](https://www.freepascal.org/)

