News for hackers. Stuff that matters.
Re:Alleged Mt.Gox code leaked on IRC node by Russian Hacker by antocv on Monday March 03, 2014 @06:17AM (#7333139)
It looks $ugly, $code is read more $often than its $written. This $ everywhere hurts the eyes.

Its syntax is bad and inconsistent, before 5.4 you couldnt have a function return an array and call it and access array contents like this funcName()['blah']. What the.

PHP only has one data type for structures, array, which in various ways pretends to be every data type, stack, queue, tree, hashmap, list, fuck it all, lets just call it array everywhere!

Anyway, everything else is implicitly converted as well, strings, integers, fuck it all, lets ouput 0 or 1 who cares.

PHP is basically not a language, its a clusterfuck of copy-pasted code everywhere, I bet its runtime, Zend, is as a copypaste of various C-libraries cobbled together.

I feel sorry for all the PHP lovers, must be stubborn ones, just like VisualBasic people 10 years ago when it was dying. PHP-lovers have the same argument now as VisualBasic did 10-15 years ago.

EDIT: Where and when I would use PHP. Never. There is always a better alternative. This talk about how easy it is to host, blah blah, then you never had to compile php and set its config flags and include dumb oci8 modules, pear or pecl files or whatever, or see it fail and no logs anywhere but you have to have system-level access to some ini files. Ugh... I think people have just learned to live with that crap, and the more sane languages and web frameworks like Flask or Grails are much easier.

Re:Alleged Mt.Gox code leaked on IRC node by Russian Hacker by jasey on Monday March 03, 2014 @08:21AM (#7333532)
One advantage it does have is apps can auto update and extend themselves. Eg, wordpress makes extending it with 3rd party plugins extremely painless from a user perspective.

As for not being able to access a array directly from a function which returns the array. It's just syntactical sugar. Yes long over due syntactical sugar however.

Re:Alleged Mt.Gox code leaked on IRC node by Russian Hacker by antocv on Wednesday March 05, 2014 @03:05AM (#7345921)
Whats that got to do with the language?

Autoupdateing can be implemented in VisualBasic as well.

Re:Alleged Mt.Gox code leaked on IRC node by Russian Hacker by coldtea on Monday March 03, 2014 @01:17PM (#7335321)
>It looks $ugly, $code is read more $often than its $written. This $ everywhere hurts the eyes.

As much as Lisps parenthesis everywhere do.

Re:Alleged Mt.Gox code leaked on IRC node by Russian Hacker by brianpgordon on Monday March 03, 2014 @07:45AM (#7333381)
Zend is, indeed, infamously a mess. HipHop is supposed to be better.

https://github.com/facebook/hhvm

Re:Alleged Mt.Gox code leaked on IRC node by Russian Hacker by dan15 on Tuesday March 04, 2014 @02:11AM (#7338930)
Yeah, Hack for HHVM adds a bunch of stuff to PHP to make it better, including:

- Collection classes like Vector (which is like an array in every other programming language ever) and Map (associative array or hashtable)

- Generics

- Lambda functions

- Asynchronous functions

- Type hinting for intrinsic types (int, string, bool)

Not much public documentation yet, but most bits are in the open source HHVM release, and there are a few blog posts on it (eg. http://www.sitepoint.com/hhvm-hack-part-1/)