www. O S N E W S .com
News Features Interviews
BlogContact Editorials
.
ObjectScript: a new programming language
By Thom Holwerda, submitted by MOS6510 on 2012-09-30 20:15:02
"The ObjectScript is a new programing language that mixes benefits of JavaScript, Lua, and PHP. The ObjectScript has syntax from JavaScript, multiple results from Lua, OOP from PHP and much more."
 Email a friend - Printer friendly - Related stories
.
Read Comments: 1-10 -- 11-20 -- 21-30 -- 31-40 -- 41-50 -- 51-52
.
RE[2]: Comment by YEPHENAS
By Alfman on 2012-10-01 08:29:12
dikatlon,

"Why is PHP so evil?"

s/evil/bad/

Well, having been a regular user since the beginning, I can say without a doubt PHP is superior in all ways to what it largely replaced: ASP. However that's where my praise ends. The language has suffered from inconsistency and poor SE decision making over the course of it's entire history such that the developer qualifications behind PHP are brought into question. PHP has a history of semantic flip flops creating code incompatibilities.

Ignoring the multitude of teething problems which PHP has been notorious for in the past. Here are current gripes that are often cited (in no particular order):

1. Namespace mess. This is all all the evidence one needs to officially declare the developers as certified amateurs. Also every programmer has their own opinions about whether function names should be camel case, abbreviated, underlined, etc, but at least we agree to pick one convention and stick to it. PHP is the only language I know of where standard functions have completely disregarded any kind of standard naming convention. One has to wonder whether they had any future direction at all.


2. Thread safety risks inhibit web hosts from being able to deploy multi-threaded versions of apache.

http://neosmart.net/blog/2008/do...
(I'd appreciate any information about whether they've finally fixed it, but it was still crashing in 2010/11)


3. Unicode.
I'm often called up by clients who find unicode glitches on a website caused by php bugs in handing unicode characters which may have been posted into the database, etc. I replace unicode characters with html equivalents, but unicode should just work these days.


4. Magic quotes.
Stupid, stupid, stupid, stupid...


5. Lack of session concurrency.
I uncovered this this year when I was trying to use concurrent ajax calls to monitor a long running process. One visitor can only have one running script per session. Apache will pass a predefined number of concurrent connections to PHP, but PHP will block them and run them serially. So, the long running process would block all further PHP pages for this visitor until the long running process was complete. This entirely defeated my intended purpose of employing concurrent ajax calls. I ended up writing a C daemon to work around the limitation.

6. Comparison operators
PHP diverges from other dynamically typed languages to use this proprietary syntax.

if (F(x)) {...}
vs
if (F(x)==true) {...}
vs
if (F(x)===true) {...}

PHP's equality personality disorder is a source of bugs and confusion. To make matters worse, we've got expressions like "x>==0".


7. PHP's documentation
Well, PHP documentation is a big plus. I thought it was superb, or so I did before php.net recently injected google search results ahead of it's own function search listings. Why did they do that?? Now I have to scroll through a screen full of irrelevant google listings before I can click on the php.net links I want.
Permalink - Score: 5
.
RE[3]: Comment by YEPHENAS
By dikatlon on 2012-10-01 08:35:37
You have enlightend me and brought up a lot of things that I didnt think about, but I know them (just forgot), for example that "===" is certainly a very stupid nonstandard way.

So whats the language I should use then?
Permalink - Score: 1
.
What I took away:
By henderson101 on 2012-10-01 09:01:14
/me "Oooh! codeproject have a new site design!"

Rest: tl;dr. Not interested in YASL. Especially one that brings nothing exciting of compelling to the table.
Permalink - Score: 2
.
RE[4]: Comment by YEPHENAS
By Alfman on 2012-10-01 09:13:18
dikatlon,

"So whats the language I should use then?"

If you don't have your own server at your disposal, then there's no denying that the widespread availability of a language is a compelling reason to use it. For better or worse, network effects have driven me to hypocritically use PHP simply because it's popular with clients.

My own personal projects are more geared towards system programming. But if I were to choose a new web language to learn today it'd be Opa. It seems to be a very welcome radical shift away from the multi-tier approach of SQL/PHP/HTML/CSS/JAVSCRIPT/ DOM into a new more convergent paradigm. Not that I can recommend something I have zero experience with it, but I'm never the less extremely interested in what it potentially offers.

My interest in Opa was sparked here on OSNews, actually:
http://www.osnews.com/story/2556...
Permalink - Score: 2
.
RE[4]: Comment by YEPHENAS
By kwan_e on 2012-10-01 10:43:02
> So whats the language I should use then?

REBOL.
Permalink - Score: 2
.
RE: They lost me
By Lennie on 2012-10-01 10:47:33
The biggest benefits are 3 folds:
- better than ASP which it was competing with at the time
- lots of built in C/C++ extensions
- readily available at webhosting companies

I can see how this was made by one or a few hackers so it started out with some inconsistencies.

The biggest problem is they never got their act together and keep making strange choices and inconsistent APIs.

I've got a feeling a lot of people don't like dynamically typed languages anyway. That probably doesn't help.
Permalink - Score: 3
.
RE[3]: Comment by YEPHENAS
By Soulbender on 2012-10-01 10:58:33
> http://me.veekun.com/blog/2012/0...

This +1. It explains pretty much everything that's wrong with PHP, and there's a lot wrong with it.
Permalink - Score: 2
.
RE[2]: They lost me
By biffuz on 2012-10-01 11:55:29
> - lots of built in C/C++ extensions
- readily available at webhosting companies


But webhosting companies won't let you add those extensions, so they're pretty much useless :(
Unless you have a server of your own, of course... but then you'll lose the advantage of having PHP for cheap.

> I've got a feeling a lot of people don't like dynamically typed languages anyway. That probably doesn't help.

I am one of those people. But what I actually hate are programmers who continue to change the type of a variable inside a function without any real need or comment, one of the hugest sources of bugs in my experience.
And those who don't write any sort of docs of their functions with 10 parameters with funny names and convoluted type.
I worked with a guy who liked to have half-indexed, half-named arrays of arrays parameters with names like "a", "b", or "c", and the only way to understand what was supposed to be inside them was to read the whole function and the whole tree of calls. Sometimes the same function was present in another file, but instead of arrays it required objects, and when he changed something he only fixed his own pages.
When they objected my productivity, I just gave up and instead of using his functions I just wrote mine.

Edited 2012-10-01 11:55 UTC
Permalink - Score: 2
.
RE[3]: They lost me
By Lennie on 2012-10-01 12:08:03
Only thing I can add to that is:

Use a webhost that has most of them installed or just ask them. If you picked the right host, they might actually be good people.
Permalink - Score: 3
.
RE[2]: Comment by some1
By moondevil on 2012-10-01 12:15:19
I used to hate PHP with passion, but got used to it on my own website.

My provider only offers Perl and PHP, and it is too much of an hassle to change provider just because of the language.

For what I do, it is good enough, even if I wouldn't advise in language in the type of corporation projects we do.
Permalink - Score: 2

Read Comments 1-10 -- 11-20 -- 21-30 -- 31-40 -- 41-50 -- 51-52

No new comments are allowed for stories older than 10 days.
This story is now archived.

.
News Features Interviews
BlogContact Editorials
.
WAP site - RSS feed
© OSNews LLC 1997-2007. All Rights Reserved.
The readers' comments are owned and a responsibility of whoever posted them.
Prefer the desktop version of OSNews?