问题
I'm thinking of writing a PHP extension module but can't tolerate the idea of messing with C or, for that matter, C++. I know that some languages provide compatibility with C APIs, Pascal being one of them, sorry for mentioning it. And I quite suppose that, since the days of Wirth, a further number of languages have appeared that ditch the memory juggling but keep being compiled to native binaries and provide interoperability with all the other programs and libraries out there. Only I didn't follow this side of the trade.
So, if you know of any such languages, which one would you recommend for a script-kiddie who would happily spend the remainder of his life not dereferencing a pointer ever again? Preferably a language that doesn't take a year to learn.
Objective C? Maybe Perl or Python might be somehow bent to do something like that, throwing the standard library away, of course?
My platform is Linux, btw.
Or am I missing something and the task of generating a PHP extension requires far more than C compatibility and I would end up rewriting Zend APIs in the target language?
P.S. I'm aware of PHP modules that integrate it with Java and Perl and a number of other things. But for now, I'm interested in writing a real, full-blown native code extension that doesn't use any interpreters or virtual machines.
来源:https://stackoverflow.com/questions/12189160/writing-a-php-extension-in-something-other-than-c-or-c