Hacker News new | ask | show | jobs
by msk-lywenn 771 days ago
You mean current photoshop includes pascal code?
4 comments

Tools used for art often get irrationally preserved for the sake of it. For example I have had a conversation with more than one person (well 2 but still) who believed unironically that the wiring inside vintage guitars and amps must be coated with asbestos insulation or it would change the tone/texture of the sound.
Don’t crush that in a hydraulic press.
What's wrong with Pascal, apart from the ability to hire developers for it?
I hated the dialects of Pascal we were using at school in the early 1980s because they didn’t really support systems programming but after I got a 286 machine I got into Turbo Pascal which did have the extensions I need and that I preferred greatly to C but I switched to C in college because I could write C programs and run them on my PC or on Sun workstations with a 32 bit address space.
Turbo Pascal and later Delphi were really nice, but I guess in the same vertical C won due to its UNIX legacy.

You can pretty much transform 1:1 between C and Pascal code.

Writing in Pascal itself is a Job Preservation Pattern
Nothing wrong, just surprised
I would not be surprised if it does. Photoshop is big and has a lot of legacy.
I have a feeling that much of it was translated to C or C++ at some point for portability and maintainability reasons. There are several automated Pascal to C translators out there, such as the following...

http://users.fred.net/tds/lab/p2c/

Also the languages are similar enough that a programmer with knowledge of both could translate it manually without too much difficulty.

Typically TeX is translated from Pascal to C too, via web2c.

But there also is a Pascal to WASM compiler out there, which was written specifically for TeX:

https://github.com/kisonecat/web2js

TeX itself is only about 500kb of wasm, uncompressed, but the memory images with LaTeX loaded are quite a bit larger.

It was transpiled to C and then C++ many years ago.