Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: alt.os.linux,alt.os.linux.ubuntu,comp.lang.php Subject: Re: anyone else writing Linux (or cross-system) applications in PHP? Date: Sun, 03 Feb 2013 12:44:10 +0100 Lines: 58 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net jgipefv15qdoMPcyu5VPiwOsLlMKl6lbu8ubOscdx1IGXqfRpKGG573XQBcdfDQPjU Cancel-Lock: sha1:yljA1f7NnGb2EMlminKT9Yec0/k= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130130 Thunderbird/17.0.2 In-Reply-To: Xref: csiph.com comp.lang.php:8192 On 03/02/13 12:20, crankypuss wrote: > The big question in my sick mind is whether to build a distro that uses > PHP as its primary scripting language or build a new language that's > what PHP could have been if it hadn't been mucked-about by all and > sundry who gave it functions like is_array() and isset() and when a > language doesn't even have consistent naming conventions well there ya > go. There are loads of scripting languages, but you will always know that a Linux (including Unix too) will have a shell installed, which makes the shell scripting a lot more popular for you don't have to install another dependency to be able to run. If REXX been built in by default in the Linux/Unix world, then it would have been as popular for scripting as Arexx in the Amiga community and replacing shell scripting with something else will be something just for your own distro. One thing talking against PHP is the memory leaking that happens over time, writing a daemon you will have it to eat up memory and need to be restarted and it don't help to use unset() every time you are finished with a variable. > Then they stuck on some OOP functionality and OOP is what everybody > thinks is the hot item but it's clumsier than hell to have to pass > around a this-pointer and you can't slip another layer into an existing > class derivation without rewriting half the world. Nothing forces you to use OOP, OOP has it's beauties, but not always the optimal way to write the code. > Of course at the same time there's the struggle over screen i/o, > everybody and his brother wants GUI which is fine except that character > mode has its uses as well. Sure you can write desktop applications in PHP, but not all OS:es has gtk/qt/ncurses bindings and not all Linux distributions has those available from the official repository, which makes PHP a poor option to write desktop applications. > The obvious compromise is an embedded app > that uses PHP to write pages to an internal browser rendering engine but > html has its limitations and damned if I'm wanting to get involved in > javascript. PHP was made for the web and it's where it has it's strengths and to make things faster and smother javascript will be a part of your life. If you want something cross-platform, then look at mono, sure it's larger to install than PHP, but the benefit is that you can make applications that will run on multiple platforms. -- //Aho