Language Improvements coming to Delphi 13

Looks like there will be a number of language improvements in Delphi 13.

A ternary operator but others to be announced.

Yeah, but in typical delphi fashion it will be verbose and half baked.

Are you on the beta?

I don’t know if I’m allowed to say if I’m on the beta or not but since I’m not (yet) then no :smile: .

I was hoping that you’d be able to cross a few items off your old ā€œDelphi needsā€¦ā€ list :smiley:

1 Like

I’m a tech partner so by extension I’m probably on the beta :wink:

So far 1 item off the list - although I am not thrilled about the syntax (too verbose).

2 Likes

The problem of course is that while they are chasing some weird and unimportant extensions, the important train to AI goes further and further away, without them. So, it looks like their objective for the near AI future is to make Delphi the absolute best, but totally useless language – with no practical applications and no users, an academic curio.

I mean the train of AI makers, trainers and runners, not the trivial REST api client train (which, BTW, in Python, can be done with like 5 lines of code). I wish there was some effort in that direction…

It’s really ridiculous that all that AI stuff is almost exclusively done in Python. And Emb’s only visible effort in this direction was with a one-off Llama.cpp wrapper about 6 months ago, which did not work for me on the 1st try / I have no conclusions there yet, while it would have been orders of magnitude more impactful if they attempted a complete rewrite/reimplementation of it in Delphi (i.e.: Chat GPT could have done 90% of it for them in hours or days, as a starting point).

Alex

1 Like

Hi Alex,

From what I understand Embarcadero/Idera are seriously investigating AI. There is AI in other Idera products and additional work is being done for Delphi.

The challenge with AI coding assistants is that if you want a well rounded solution it is a very large undertaking. It needs to do multiple things:

  • Multi-step agentinc coding (ā€œadd feature Xā€) with manual acceptance for potentially destructive changes. Sub agents to run tasks in parallel
  • Code completion (this one is tough to solve with low latency - editors like Windsurf use a custom LLM)
  • Planning capabilities (pre-map out a list of steps to solve the task, iterate over each step to completion)
  • Spec driven (this is the new kid on the block which supposedly produces better results than simple prompts and stores the spec in your repo so you can go back to the ā€œwhyā€ and ā€œhowā€)
  • Memories (recall important prior prompts/steps)
  • Rules (custom rules to guide the model, implemented at different levels)
  • Wide set of @context and ability to pin (files, lines, memories, rules, …)
  • MCP (call external tools like the compiler, LSP, and all the usual tools like grep, file operations, git, DB inspection, Jira, Google docs, …)
  • Good SCM integration (in addition to simple tool use) such as submitting/reviewing pull requests, file history from repo to unpushed commits to staged changes to unstaged changes
  • Support multiple LLMs (and for Delphi would work best with BYO API keys unless Embarcadero has their own custom LLM then it might need to be a usage based paid sub)
  • And the list goes on…

And then there is a need to be quite nimble in adding/updating features. The AI landscape is moving at an extremely rapid pace. Even companies focused on AI editors such as Windsurf and Cursor who release updates every other week are moving a too slowly.

Some important requirements for Delphi, being different to most other dev tools:

  • The context/code search/index needs to support multiple root folders (e.g. inspect the files in the project file and the library paths). Existing AI powered editors generally assume that all code for an app is within a single parent folder
  • Better support for form files. LLMs are generally ok with creating and editing Delphi forms as text files but sometimes make mistakes that are a bit more difficult to work with. These should be text editor centric and include a form linter/compiler that can generate warnings and errors when checking the structure of the form, not just a modal popup error dialog like we have in the form designer
  • Integration with other IDE features, eg. via an in-built MCP server in the IDE. The Delphi IDE is much more feature rich than the AI editors. Expose things like creating new projects/forms/units from the built in templates, changing build platforms, switching debug and release, run with debugger/breakpoints/step/variable inspection, deployment manager, …

Cheers,
Jarrod

2 Likes

Jarrod,

That’s all client-side stuff. Most already exists, actually. TMS has covered MCP and hopefully a direct link from AI to code editing, compilation and debugging, with appropriate feedbacks, are but a step away. – that’s great, of course, but it’s short of getting anywhere closer to the heart of the whole AI thing. And apart from us, this is probably of no use to anyone anymore: since it’s all done in Python anyway, everyone is doing clients in Python as well (including webservers, which are just client pieces to AI), with maybe just a bit of HTML/CSS/JS in the mix.

I meant the server-side: Delphi code to work with tensors, cuda, load models for inference, do training, do conversions (i.e.: GGUF), quantization – this kind of stuff.

Alex

Have a look at some of the projects by

I haven’t tried any of his recent projects, but he seems to have a variety of AI projects, including ones based on llama.cpp

Also Have a list of AI projects that I have stared on github. Most of them are delphi or the major AI projects.

1 Like

Sounds like there is a gap in the market for this stuff - if there is a market - and that is the question :man_shrugging:

Just because 1 person wants something, doesn’t mean lots of others do. Most delphi users are maintaining line of business applications, and many want client side coding assistants.

I’m personally very happy to see language enhancements - I just hope they are not half broken and take multiple releases to be usable.

3 Likes

Geoff,

That’s great, I missed these, will be looking at that next, thanks!

Emb should be incorporating these bits into Delphi…

Alex

This is absolutely incorrect.

That point of view is very short-sighted - you’re effectively assuming that the people who work on things like the new Ternary operator are the same ones who work on AI and IDE integrations and that is ONE HUNDRED PERCENT NOT THE CASE. They are completely different teams.

I can’t go into details but there is a lot more coming for AI - both from us and from third-parties and in several forms (not just an overgrown Clippy like chatbot).

A reminder - all discussions about the beta for those who are on it should be exclusively in the beta forum. It’s a one-sided conversation in places like ADUG because Staff can’t respond openly and any negative or inaccurate statements (which I saw but I notice were withdrawn) can’t be addressed without one or all of us breaching the NDA. :grin::+1:

Can confirm that Lumina project works from that collection. Haven’t tried others yet.

Although, it must be doing GPU access through OpenGL or DirectX, because it’s hitting wrong cores, so the performance may not be ideal. And it needs an output filtering layer added to remove special tokens emitted by the models. But it does work, so you can ship your own GGUF file and run it under the hood, to protect your IP, invisible from outside :wink:

Alex

1 Like

This is just an idea of a Delphi language improvement
The var in the example below can be a default setting after declaring the procedure so you do not have to write it- you just write ’ I : integer; ’
not a biggie

procedure TForm1.FormDestroy(Sender: TObject);
var 
  I : integer; 
begin

end;

The only thing I do not like is under the ā€˜type’ command how you use pointers is different/opposite to under the ā€˜Var’ command. The rest of the command structure of Delphi has a very good standard that is very well thought out.

AI is something I have not played around with enough but I do understand - when you write a book you play with the words to give the story colour and AI rewrites the story to a standard that removes that colour in the descriptions and gets the spelling right.
Delphi and every other language does not have colour in its code ether that AI should look at programming languages as a language and take programming code examples then take a English instruction and use the examples to amalgamate an application. So I’m saying is AI can communicate into a application language at a high level and not think low level at all as may be more seen of a application language translation service.
But AI needs to be communicated back the errors from the complier.
So broadening the scope to newbies and AI needs is no different than a very capable programmer writing a help file to some one using something new for the first time - the capable programmer cannot see what the newbie needs to read.
What I’m saying is Python is laughing at Delphi because high level is simplistic to the newbie programmer where RAD has forgot simplicity that even AI would use Python before Delphi because of simplicity is the focus. Example - Delphi jumps straight into database and removes all other development needs.
This may sound backward to an experienced Delphi programmer but to a newbie this is the very level they are at with their current programming idea’s and they get these services with the popular high level languages of today but is not available in Delphi.
The biggest issue with Delphi that why its not getting used is the heavy focus to databases and the biggest advantage of Delphi is screen object presentation for the many application uses - 80% of all new Delphi users from the very beginning of Delphi what a TTextGrid much like TStringGrid but a separate object and as a back ground object and every cell can install a focused object of any of TTextEdit, TTextMaskEdit, TTextSpinEdit, TTextDateTime, TTextCurrencyEdit TTextFloutEdit.
When one of these objects are linked to the TTextEdit its sized into the Focused cell and Grid selection is a separate issue. TTextEdit also offers programmicly text receiving and delivery to the focused cell and with short strings. That is a text record of a float value and a currency value and the reverse. And when focus is lost to any of these objects the value is recorded into the focused cell of TTextGrid. So their is a ton of Delphi code but the Newbie Delphi programmer can write applications at their level and not at the experienced Delphi programmer’s level. With Time they become the experienced Delphi programmer. Delphi is not marketing their product into this gap and has less newbies than when Delphi 5 to Delphi 7 was out. Even a AI developer will not favour Delphi over Python but a AI product that used Delphi could do so much more diversity in development if simplicity was the focus and still be RAD.

Ian,

  • I can’t go into details but there is a lot more coming for AI

Can you give us any clues at all at this stage? Would FireDac provide support for any vector databases natively any time soon, for example?

Alex

:cry:

Right now, many of the details could - and often do - change as the Beta progresses. That’s why we are careful not to ā€˜pre-announce’ new features unless we think there’s a good chance they will make it into the GA release. That’s also why we always have a disclaimer that says ā€œfeatures are not final until the GA releaseā€ - a beta tester might find a show-stopping issue with something, and we have to either radically change it or drop it until we can address it.

It’s additionally compounded by the global nature of Embarcadero - we trade in an eye-watering range of different countries and legal jurisdictions and there are rules about ā€œforward-looking statementsā€ in many of them which we have to navigate. That’s one of the reasons why Idera (our parent company) has a very strict rule that we cannot produce roadmaps. Life would be a lot easier for us at Embarcadero if we could but, at the same time, I get where they’re coming from. I don’t like it, but it doesn’t mean they’re not right.

When we do ā€˜sneak peek’ kinds of webinars and blog posts the information they contain has gone through a review to try to ensure that what we’re saying is accurate, achievable, and is likely to be close to or equal to what makes it into the GA release.

1 Like

It’s certainly 13 and not 12.4, right? Is the name known yet? – need a name for a new VM :wink:

Alex

1 Like

Cool, thanks!

Alex

I realise my Idea’s are a bit wako to what is ever going to happen
never mind