开发者

Is it possible to translate everething written in OCaml to PHP?

Is it possible to translate everething written in OCaml to PHP? for example will it be hard to translate such lib 开发者_JS百科as lib for Fast content-aware image resizing


Short answer, yes, long answer yes, but it might be difficult. In this particular case the author translated code from Python (code found here) into OCaml. Additionally you can read the paper that presents the algorithm here (pdf link). Given that you have two implementations and access to the paper describing the algorithm I'd say guess that it won't be difficult to implement in PHP.

That said, OCaml is a compiled language and will run a lot faster than PHP. The Python implementation uses a lot of C libraries to speed it up (and is still half as fast as the OCaml implementation).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜