Discussion:
Programmable backend for Delphi compiler.
(too old to reply)
Skybuck Flying
2014-09-17 02:35:58 UTC
Permalink
Hello,

One of Delphi's biggest disadventages is lack of platform/hardware/chip
support. Delphi can only be used on the chips/instruction sets that it was
designed for.

Unlike C/C++ which has more platform/chip/hardware support.

This is also one of the features of it's main competitor: FreePascal.

My idea for Delphi is to open-up the backend of Delphi a little bit so that
Delphi becomes a little bit like macro language or assembler generating
language.

It should become possible for Delphi programmers to use all the great Delphi
tools like the IDE, Frameworks, GUI Designers, Parser, Perhaps even
Modified/Extended Debugger/Hint/Warning Messaging system, but still be able
to generate instructions for different hardware.

C/C++ already has a feature similiar to this idea: It's macro language,
which can be used to generate assembler instructions, which is a bit more
powerfull than just inlined assembler instructions.

I would probably prefer something that is easy to use and learn for example
something special, like passing parameters to "abstract" "for loop
constructs" and other constructs.

Writing a back-end is probably not easy, but any kind of help how to do it
in a standardized way would be very cool.

This would be a little bit similiar to "generics" and the TParallel.ForAll
construct or something like that. So a bit more "free programming" language,
a bit like a "meta-programming language". The language itself doesn't
directly generate instructions, but instead helps the programmer to do so
for a custom instruction set, which could even be virtual/experimental.

The biggest adventage is re-using the Delphi parser and language itself.

Anyway, this could solve one of Delphi's biggest fears: being stuck on a
platform which is no longer used, or lack of new emerging platforms.

Delphi's creator haven taken on the task of creating such backends for
populair platforms. It's a bit of their territorium so to speak, there turf.

However I think Delphi's tool in general is complex enough for some room to
make the backend a bit more open and programmable or configurable.

If this is in their commercial interest is up to them to decide. Personally
I think this could make Delphi very populair perhaps even as populair as
C/C++ or maybe even beyond that if it gets lots of platform support created
by hobbists or perhaps even third party companies.

Perhaps the debugger could also be modified in such a way that it can handle
plugged-in instruction sets or so.

All-in-all an idea worthy to consider I think ;)

Perhaps it will make it also easier for other companies to plug in their
specific hardware platforms into delphi's compiler/tool framework and such.

Bye,
Skybuck.
Robert Wessel
2014-09-17 03:58:25 UTC
Permalink
On Wed, 17 Sep 2014 04:35:58 +0200, "Skybuck Flying"
Post by Skybuck Flying
Hello,
One of Delphi's biggest disadventages is lack of platform/hardware/chip
support. Delphi can only be used on the chips/instruction sets that it was
designed for.
Unlike C/C++ which has more platform/chip/hardware support.
This is also one of the features of it's main competitor: FreePascal.
My idea for Delphi is to open-up the backend of Delphi a little bit so that
Delphi becomes a little bit like macro language or assembler generating
language.
It should become possible for Delphi programmers to use all the great Delphi
tools like the IDE, Frameworks, GUI Designers, Parser, Perhaps even
Modified/Extended Debugger/Hint/Warning Messaging system, but still be able
to generate instructions for different hardware.
C/C++ already has a feature similiar to this idea: It's macro language,
which can be used to generate assembler instructions, which is a bit more
powerfull than just inlined assembler instructions.
I would probably prefer something that is easy to use and learn for example
something special, like passing parameters to "abstract" "for loop
constructs" and other constructs.
Writing a back-end is probably not easy, but any kind of help how to do it
in a standardized way would be very cool.
This would be a little bit similiar to "generics" and the TParallel.ForAll
construct or something like that. So a bit more "free programming" language,
a bit like a "meta-programming language". The language itself doesn't
directly generate instructions, but instead helps the programmer to do so
for a custom instruction set, which could even be virtual/experimental.
The biggest adventage is re-using the Delphi parser and language itself.
Anyway, this could solve one of Delphi's biggest fears: being stuck on a
platform which is no longer used, or lack of new emerging platforms.
Delphi's creator haven taken on the task of creating such backends for
populair platforms. It's a bit of their territorium so to speak, there turf.
However I think Delphi's tool in general is complex enough for some room to
make the backend a bit more open and programmable or configurable.
If this is in their commercial interest is up to them to decide. Personally
I think this could make Delphi very populair perhaps even as populair as
C/C++ or maybe even beyond that if it gets lots of platform support created
by hobbists or perhaps even third party companies.
Perhaps the debugger could also be modified in such a way that it can handle
plugged-in instruction sets or so.
All-in-all an idea worthy to consider I think ;)
Perhaps it will make it also easier for other companies to plug in their
specific hardware platforms into delphi's compiler/tool framework and such.
Why not work on getting the GPC front end to GCC (which already
supports some of the Delphi extensions) supported by the IDE and
extended to cover more of the Delphi language features?

Certainly there is no lack of back-ends there, not to mention that the
documentation for doing a new one is explicitly out there (although
it's far from a trivial undertaking).
Skybuck Flying
2014-09-17 15:24:56 UTC
Permalink
"Robert Wessel" wrote in message news:***@4ax.com...

On Wed, 17 Sep 2014 04:35:58 +0200, "Skybuck Flying"
Post by Skybuck Flying
Hello,
One of Delphi's biggest disadventages is lack of platform/hardware/chip
support. Delphi can only be used on the chips/instruction sets that it was
designed for.
Unlike C/C++ which has more platform/chip/hardware support.
This is also one of the features of it's main competitor: FreePascal.
My idea for Delphi is to open-up the backend of Delphi a little bit so that
Delphi becomes a little bit like macro language or assembler generating
language.
It should become possible for Delphi programmers to use all the great Delphi
tools like the IDE, Frameworks, GUI Designers, Parser, Perhaps even
Modified/Extended Debugger/Hint/Warning Messaging system, but still be able
to generate instructions for different hardware.
C/C++ already has a feature similiar to this idea: It's macro language,
which can be used to generate assembler instructions, which is a bit more
powerfull than just inlined assembler instructions.
I would probably prefer something that is easy to use and learn for example
something special, like passing parameters to "abstract" "for loop
constructs" and other constructs.
Writing a back-end is probably not easy, but any kind of help how to do it
in a standardized way would be very cool.
This would be a little bit similiar to "generics" and the TParallel.ForAll
construct or something like that. So a bit more "free programming" language,
a bit like a "meta-programming language". The language itself doesn't
directly generate instructions, but instead helps the programmer to do so
for a custom instruction set, which could even be virtual/experimental.
The biggest adventage is re-using the Delphi parser and language itself.
Anyway, this could solve one of Delphi's biggest fears: being stuck on a
platform which is no longer used, or lack of new emerging platforms.
Delphi's creator haven taken on the task of creating such backends for
populair platforms. It's a bit of their territorium so to speak, there turf.
However I think Delphi's tool in general is complex enough for some room to
make the backend a bit more open and programmable or configurable.
If this is in their commercial interest is up to them to decide. Personally
I think this could make Delphi very populair perhaps even as populair as
C/C++ or maybe even beyond that if it gets lots of platform support created
by hobbists or perhaps even third party companies.
Perhaps the debugger could also be modified in such a way that it can handle
plugged-in instruction sets or so.
All-in-all an idea worthy to consider I think ;)
Perhaps it will make it also easier for other companies to plug in their
specific hardware platforms into delphi's compiler/tool framework and such.
"
Why not work on getting the GPC front end to GCC (which already
supports some of the Delphi extensions) supported by the IDE and
extended to cover more of the Delphi language features?

Certainly there is no lack of back-ends there, not to mention that the
documentation for doing a new one is explicitly out there (although
it's far from a trivial undertaking).
"

GPC = GNU Pascal Compiler
GCC = GNU C Compiler

Which Delphi extensions ? Where to read more about this ?

What IDE do you mean ? Did you mean Delphi IDE, and if so how can Delphi IDE
use GPC or GCC ?

Reasons why not to work on a front end for GCC:

1. If GCC does not have the required backend it does not solve anything.

2. GNU Compilers slow, though this is less of a concern but still a concern.

3. I am looking for something easy, hopefully Delphi creators can create
something easy to use.

4. No other tools required, can hopefully work directly from Delphi.

5. Full Delphi language support perhaps in future, though it could start out
minimal. For loops, or while loops, if statements, some basic statements and
perhaps procedures, the more language features supported the better
ofcourse, but starting out minimal could be interesting.

Bye,
Skybuck.

Loading...