ThomasMertes / seed7

Source code of Seed7
GNU General Public License v2.0
207 stars 11 forks source link

Can this language compile to a dll/so? #11

Open Zireael07 opened 1 year ago

Zireael07 commented 1 year ago

I looked through the site and unfortunately no mentions...

ThomasMertes commented 1 year ago

Basically compiling to a dll/so would be possible. But there are obstacles. Regarding libraries, the approach used by Seed7 and other languages differs considerably. Seed7 libraries can be included directly, while the usual dll/so needs an additional header file which describes the interfaces of the dll/so. The Seed7 overloading does not use name mangling and a possible name mangling of Seed7 would be incompatible to the ones used by other languages. Fundamental types like 'string', bigInteger, 'array', hash and 'file' could not be used directly from other languages. When a Seed7 dll/so is only used by Seed7, there would still be the name mangling and the header file issue. Compiling to a dll/so is not high on the priority list, but if someone implements it, it will be merged.