r/delphi • • 17h ago

Vallenta Studio - inlay hints for Delphi in VS Code: parameter names, var/out marks at the call, inline variable types

5 Upvotes

If you've used TypeScript, C#, Rust, or Java in VS Code or JetBrains IDEs, you've probably gotten used to inlay hints - inline annotations rendered by the editor that show information from a declaration right at the call site, without modifying your actual source code.

I've added Inlay Hints for Object Pascal to Vallenta Studio (my Delphi extension for VS Code).
As far as I know, no other Delphi tool shows inlay hints, RAD Studio 13.2 and DelphiLSP included.

A simple example:

// As written in your .pas file
ClampTemperature(Forecast, -40.0, 50.0);

// Displayed in the editor with inlay hints
ClampTemperature(var Value: Forecast, MinValue: -40.0, MaxValue: 50.0);

The language server resolves the routine and VS Code renders the hints inline in a muted style.

Features

var and out marks at the call site

Arguments passed to var or out parameters get a var or out prefix right at the call:

GetTemperatureRange(Station.Readings, out MinTemp, out MaxTemp);
CountWetAndDryDays(Station.Readings, var WetDays, var DryDays);

**var and out argument colors **

You also can color var and out arguments directly instead, or combine both the inline mark and the color. (colors are configurable)

Parameter names

Shows parameter names before arguments:

Inline variable types

Shows the inferred type directly after untyped inline var and const declarations and for var loop variables.

Full overview with before/after screenshots and per-setting examples: https://vallenta.de/inlay-hints

VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=VallentaStudio.vallenta-studio

Bug reports and feature requests: https://github.com/Vallenta/Studio/issues

Michael


r/delphi • • 15h ago

Project I measured 879 Delphi 13 builds and documented 89 compiler directives so AI agents stop hallucinating Delphi & Win64 semantics (free demo on GitHub)

1 Upvotes

Hi r/delphi,

(Transparency: this is a commercial reference/tooling kit I built, with a free < 1 MB evaluation demo on GitHub.)

Whenever I watch AI coding agents work on real Delphi codebases — especially upgrading legacy Delphi 7/2007 32-bit projects to Delphi 12–13 & Win64, auditing compiler directives, or porting modules to C#/C++/Java — the same failure pattern shows up: the generated code looks plausible and compiles cleanly, yet breaks actual Delphi runtime behavior.

So I built Delphi Behavior Contracts (Universal Suite v1.0.0), measured directly against Delphi 13 Community Edition (879 build observations and 650 executable runs across Win32, Win64, and compile-only Android ARM).

What's inside

  • 74 bilingual chapters (EN & RU) + full single-file books (EN & RU), analyzing each operation across 9 behavior contract dimensions (parameter modes & aliasing, hidden state, receiver dispatch, preconditions, evaluation order, arithmetic width & rounding, unwind cleanup, ownership, and external DFM/DB/DLL contracts).
  • 89 compiler directive cards separating syntax the parser silently accepts from options that genuinely change generated code on Win32, Win64, and Android ARM — plus an explicit named register of 30 documentation vs. compiler ambiguities.
  • Concrete compiler-verified traps:

    • All 6 physical models of B := A across 13 type families (dynamic arrays share a mutable buffer without copy-on-write, long strings share with copy-on-write, static arrays/records copy by value).
    • Extended Win32 (10-byte 80-bit x87) vs. Win64 (8-byte 53-bit Double), including {$EXTENDEDCOMPATIBILITY ON} (SizeOf = 10, yet 53-bit arithmetic).
    • Banker's rounding in System.Round (plus uses shadowing), logical shr on signed integers, and eager evaluation of Variant / overloaded operators even under {$B-}.
  • 100% offline cross-platform setup (install.py, zero dependencies, zero symlinks): ships 8 native plugins (Claude Code, Codex, Cursor, GitHub Copilot/VS Code, Gemini CLI, Antigravity), pure skills for 13+ platforms (Windsurf, Cline/Roo/Kilo, JetBrains Junie, Kiro, web chats), and an offline Python/Docker MCP server (also in the official MCP Registry as io.github.DIIIUA/delphi-behavior-contracts) + Cloudflare Worker MCP and 14 client configs. Proprietary source never leaves your machine.

Free Demo & Honest Boundaries

The free < 1 MB demo includes the complete 74-chapter and 89-directive Table of Contents, 6 multi-difficulty excerpts, 4 full directive cards, 8 authentic compiler receipts, 6 .dpr probes, and working plugins/skills/MCP:

Honest scope limits: this is strictly a Delphi / Object Pascal language, behavior-contract, and directive reference — not a VCL, FMX, or FireDAC component API encyclopedia. It does not claim 100% coverage of the language or any ABI; unresolved questions are listed explicitly by name. Independent product, not affiliated with Embarcadero Technologies.

If you're maintaining or upgrading legacy Delphi to Win64, I'd love to hear which compiler or directive traps still bite your team or AI tools most often.