opentoonz / opentoonz_docs

OpenToonz User Manual
http://opentoonz.readthedocs.io
28 stars 26 forks source link

Why choose C++ to delevep opentoonz? #176

Open liaodalin19903 opened 3 months ago

liaodalin19903 commented 3 months ago

Ask a question related to OpenToonz

Why choose C++ to delevep opentoonz?

why don't use python, typescript to do with it? please tell me the reasons.

RodneyBaker commented 3 months ago

Toonz original code dates back to before the year 2000 when python/typescript was definitely not an option. If you want to take on a complete rewrite of the code with python and typescript that would certainly be an educational exercise.

If you mean to say just add python and typescript to the current code then... that's a different exercise. Most of Opentoonz file formatting is compatible with python/typescript so mostly it just will take someone interested like you to get the ball rolling.

Send a pull request with your code additions and that will surely get others familiar with python/typescript interested in contributing as well.

gab3d commented 3 months ago

Python is much slower than C or C++ code. Almost no big program is done in Python for good reason.

Having Python scripting, that would indeed be great.

Bracket-H commented 3 months ago

Personally, I think OT would have been more broken with python than C++ and maintaining it would be more difficult, too, even if python had been viable back then.

There's a reason why scripted languages like python have these super bloated and awkward built systems that replicate libraries eternally (virtual envs) because these non compiled languages break so easily (and often obtusely, like perl...where you get 'helpful stuff' like "expected handshake 0x0032fa32 got '0x0032f040').

Now, compiled languages also fail if you mess up libraries, but on linux at least, for example, I have a myriad of programs sharing the same libraries, sure I have to recompile some but then things work again.

I always have more trouble with python (especially since the python 2 and 3 split...with some old programs still wanting 2, newers 3, and it's not like they compile into machine language like C, C++ et al) And perl.

I'm always sad when some super duper cool software has python at the core because it's a pain to maintain. But I do like python as a language for scripting. So I agree, I would enjoy OT having python scripting.

Just don't make the whole thing out of it..

RodneyBaker commented 3 months ago

Moving to documentation...