My recommendation would be to try python. It is dynamically/strongly typed, and has syntax and features relatively similar to php. It can't be compiled to an executable, but it can be compiled to byte-code, like java is.
I have been programming in php for several years and recently picked up python and have really enjoyed it. I have also used c++ and java quite a bit and find them to be more difficult to master, and more frustrating to use.
There's not much value is learning a "PHP for the desktop language". I'd recommend that you explore language with different principles (say Python or Ruby) and use Desktop apps as your learning vehicle. PHP is written to be embedded inside a web page and that carries over even when you use it as a regular scripting language.
You can learn the ropes a little before picking up a new language by using something like PHP GTK.
PHP's design principles are fine on server side, but in many places they don't really fit in the world of Desktop development. For example, native Windows applications follow entirely different paradigms. Being able to work with these in a PHP-like language requires an additional (performance-intensive) layer between your language and the Windows API.
Bottom line: Much of Desktop app programming is so fundamentally different from how a PHP web app works, you won't get far with PHP's paradigms anyway.
I would therefore recommend to drop the requirements, and look/ask for the optimal language for the task instead. I don't know your situation of course, but if you have the time, chance and inclination at all, it's a great way to expand the programming horizon; also from a professional and CV perspective, it doesn't hurt to have another language under your belt.
发布评论
评论(3)
我的建议是尝试 python。它是动态/强类型的,并且具有与 php 相对相似的语法和功能。它不能编译为可执行文件,但可以编译为字节码,就像 java 一样。
我已经用 php 编程好几年了,最近开始学习 python,并且非常喜欢它。我也用过相当多的c++和java,发现它们更难掌握,而且用起来更令人沮丧。
My recommendation would be to try python. It is dynamically/strongly typed, and has syntax and features relatively similar to php. It can't be compiled to an executable, but it can be compiled to byte-code, like java is.
I have been programming in php for several years and recently picked up python and have really enjoyed it. I have also used c++ and java quite a bit and find them to be more difficult to master, and more frustrating to use.
学习“桌面语言 PHP”并没有多大价值。我建议您探索具有不同原理的语言(例如 Python 或 Ruby),并使用桌面应用程序作为学习工具。 PHP 被编写为嵌入网页中,即使您将其用作常规脚本语言,它也会继续存在。
在学习一门新语言之前,您可以使用 PHP GTK 之类的东西来学习一些入门知识。
There's not much value is learning a "PHP for the desktop language". I'd recommend that you explore language with different principles (say Python or Ruby) and use Desktop apps as your learning vehicle. PHP is written to be embedded inside a web page and that carries over even when you use it as a regular scripting language.
You can learn the ropes a little before picking up a new language by using something like PHP GTK.
PHP 的设计原则在服务器端很好,但在很多地方它们并不真正适合桌面开发世界。例如,本机 Windows 应用程序遵循完全不同的范例。为了能够在类似 PHP 的语言中使用这些内容,需要在您的语言和 Windows API 之间添加一个额外的(性能密集型)层。
底线:许多桌面应用程序编程与 PHP Web 应用程序的工作方式有着本质上的不同,无论如何,您都无法深入了解 PHP 的范例。
因此,我建议放弃这些要求,并寻找/询问该任务的最佳语言。我当然不知道你的情况,但如果你有时间、机会和兴趣,这是扩展编程视野的好方法;同样从专业和简历的角度来看,掌握另一种语言也没什么坏处。
PHP's design principles are fine on server side, but in many places they don't really fit in the world of Desktop development. For example, native Windows applications follow entirely different paradigms. Being able to work with these in a PHP-like language requires an additional (performance-intensive) layer between your language and the Windows API.
Bottom line: Much of Desktop app programming is so fundamentally different from how a PHP web app works, you won't get far with PHP's paradigms anyway.
I would therefore recommend to drop the requirements, and look/ask for the optimal language for the task instead. I don't know your situation of course, but if you have the time, chance and inclination at all, it's a great way to expand the programming horizon; also from a professional and CV perspective, it doesn't hurt to have another language under your belt.