Felipe Monteiro de Carvalho wrote 8 lines
On Sun, Jan 29, 2012 at 11:38 PM, Lars wrote:
> Do other languages like python use the plain c interface, or C++?
>
> how about something like ruby, lua, objective C, php ..
No idea, but Python, ruby, lua and php do not generate real programs
but instead are just scripts which run in a interpreter, which is
immensely different from a real program.
"Real Programmers"...
When you use pascal to build web programs you use templates, right.. so you are interpreting templates. When you read an INI file you are interpreting the INI file. Some pascals, safe ones, are interpreted. Like Oberon, or UCSD Pascal. When you parse an Edit.Text and check it to make sure there is not some user error on input, you are interpreting things. Compiled programs are not fully compiled, they always contain some run time interpretation. When you use regexes they are interpreted. When you use wildcards in search boxes they are interpreted. From my testing, CGI programs that are compiled binaries, are actually SlowER than PHP programs. I am no fan of PHP , but it is pretty fast.
Show quoted text 5 lines
A more close comparison to Pascal might be asking what Fortran, Cobol,
Ada or other similar compiled languages do, and I think that all of
those would need a C interface.
True, but still interesting to know if Python objects are somehow compatible with C++ objects, as a kind of academic exersise.. how do they do it? Possibly they just bind to procedural API, but it would be cool if they somehow did it more effectively. I also mentioned Objective C in my request but I have no idea if objective c even has a QT binding..
Show quoted text 5 lines
I know very well Java due to Android work, which cannot bind to
anything directly. It requires a special format using plain procedures
in a special way, so it is like a C interface, or a plan Pascal
procedural interface. It is called JNI and it will never accept C++
That's good information and adds to the knowledge.. of how they do it. Cool.