Forum > Suggestions

Cython for Pascal

(1/1)

Webdrifter:
Hope this is the right place for my question/suggestion.

As we all know Python and C have an enormous popularity advantage over Pascal.
And that quality is not the major problem for the future of Pascal and Lazarus, but their lack of popularity is.

We also know that speed is one of Pythons major problems, in particular because Python is widely used for AI and serious AI applications require a lot of calculation speed.

Cython is a great way to speed up Python using C.

My question/suggestion: Does there already exist something similar like Cython but using Pascal instead?

If so, maybe it could be a great way to entice programmers to use Pascal and thus increase the popularity of Pascal and ultimately Lazarus.

(Which may ultimately also contribute to the development of Pascal and Lazarus, and thus ensure the realization of a virtuous circle of popularity and development.)

Or is this a dumb idea? (Forgive me I'm a hobbyist without IT-background).

AlexTP:
Such thing does not exist.

Bogen85:

--- Quote from: Webdrifter on December 20, 2022, 02:15:15 pm ---Cython is a great way to speed up Python using C.

--- End quote ---

For some things. Many of the core modules for Python are already written in C (or Rust), especially ones that are speed critical.

From what I've seen Cython makes it easier to write Python modules that need to link to a lot of existing C code.


--- Quote from: Webdrifter on December 20, 2022, 02:15:15 pm ---My question/suggestion: Does there already exist something similar like Cython but using Pascal instead?

If so, maybe it could be a great way to entice programmers to use Pascal and thus increase the popularity of Pascal and ultimately Lazarus.

(Which may ultimately also contribute to the development of Pascal and Lazarus, and thus ensure the realization of a virtuous circle of popularity and development.)

--- End quote ---

No, does not exist, and would take many years to develop, with potentially little gain.

Cython already exists, and Cython modules can be used in any environment where python modules can be used.

MarkMLl:

--- Quote from: AlexTP on December 20, 2022, 02:17:40 pm ---Such thing does not exist.

--- End quote ---

I agree. I have in the past investigated embedding Python (only v2, since that's what I needed) in an FPC program, and in principle it would not have been too difficult to extend that so that a Python script could call Pascal to implement a UI. I might revisit it at some point if it turns out that I still have the requirement, but that really is as far as I'm going.

MarkMLl

Thaddy:
- IF Python has any speed it is because most of its libraries are compiled to a native language, not Python.
- There are Python bindings for FreePascal.
- You can write Python extensions in FreePascal.

I would not worry too much otherwise.

(I use Python and the above daily )

Navigation

[0] Message Index

Go to full version