News for hackers. Stuff that matters.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by AlexanderDhoore on Thursday December 19, 2013 @03:09PM (#6937471)
I'll take a long function name over an incomprehensible one any day.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by meritt on Thursday December 19, 2013 @03:16PM (#6937527)
Given that many of PHP's method names are that way due to mirroring C (and others due to the hash table hackery), I think you'd just be much happier in a different language.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by gizmo on Thursday December 19, 2013 @06:46PM (#6938845)
Expanding abbreviations doesn't improve clarity.

E.g. XMLHttpRequest vs ExtensibleMarkupLanguageHypertextTransferProtocolRequest

and ftp_ssl_connect vs FileTransferProtocol_SecureSocketLayer_Connect

or if you want to get really ridiculous:

MysqlndUhConnection::sslSet becomes MyStructuredQueryLanguageNativeDriverUserHandlerConnection::SecureSocketLayerSet

Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by stevejohnson on Thursday December 19, 2013 @07:29PM (#6939044)
You're misrepresenting his position pretty badly. XMLHttpRequest is a comprehensible name. "MysqlndUhConnection" much less so.

Not being very familiar with PHP, I don't have any pet examples of inconsistent names to offer corrections for that might correspond with what he's actually talking about.

Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by camus2 on Thursday December 19, 2013 @07:58PM (#6939193)
yeah , some people think it's easy to understand what strstr does...
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by userbinator on Thursday December 19, 2013 @11:25PM (#6939930)
...like everyone who has learned C or its derivatives. It's just part of the vocabulary of the language. You could as well ask "what's a list comprehension" in Python, for example.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by mzl on Friday December 20, 2013 @03:24AM (#6940537)
Set comprehension is a standard mathematical term (http://en.wikipedia.org/wiki/Set-builder_notation). List comprehension is a fairly natural name given that.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by 1qaz2wsx3edc on Thursday December 19, 2013 @07:07PM (#6938932)
While you're at it why don't you fix: (needle, haystack), (haystack, needle)? :P
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by Domenic_S on Thursday December 19, 2013 @07:16PM (#6938975)
With array functions, the needle is first. With string functions, the haystack is first.

https://gist.github.com/salathe/1672543

Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by turbo_pax on Thursday December 19, 2013 @08:39PM (#6939350)
Are you sure it's that consistent? I just feel like there's some function hiding somewhere that breaks this rule.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by 1qaz2wsx3edc on Thursday December 19, 2013 @07:41PM (#6939102)
This still doesn't convince me it was ever a beneficial design.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by Domenic_S on Friday December 20, 2013 @01:47PM (#6943177)
I didn't claim it was beneficial, just consistent.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by e-tron on Thursday December 19, 2013 @09:48PM (#6939616)
Or even use a proper IDE to code other than gedit/notepad !!
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by dubcanada on Thursday December 19, 2013 @03:16PM (#6937531)
The function names come mostly from C, so it's not really PHP's fault.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by rafekett on Thursday December 19, 2013 @05:20PM (#6938339)
It _is_ their fault, for repeating the stupid mistakes that Kernighan, Ritchie, et al made when designing Unix and C.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by pdog on Thursday December 19, 2013 @05:34PM (#6938434)
Short names weren't really a mistake when K&R made them.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by rafekett on Thursday December 19, 2013 @05:58PM (#6938592)
Yes, for some time (the dark ages I like to think) programmers had to sacrifice productivity to make things faster, or to make them fit in memory. The original C compiler had a 6 character limit on variable names, leading to abominations like `strstr()`.

Fortunately, by the Pentium era, which was when PHP was designed, those times were long gone.

"X made this design decision before us" is never a good justification for any design decision unless the decision is truly arbitrary (i.e., are arrays 0 or 1 indexed?) -- then it might be better to stick to what's more familiar. If it was a good design decision then, then there must have been some reason at the time that should be true now to give a good case for repeating a design decision.

Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by Crito on Thursday December 19, 2013 @06:37PM (#6938802)
I find the juxtaposition between PHP's short function names taken from C, and things like T_PAAMAYIM_NEKUDOTAYIM to be rather funny.
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by e-tron on Thursday December 19, 2013 @09:52PM (#6939632)
recently(not quite) there was a talk in php internals about changing that.

read this:

http://philsturgeon.co.uk/blog/2013/09/t-paamayim-nekudotayi...

Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by Crito on Thursday December 19, 2013 @11:27PM (#6939933)
Well, so long as they don't fix the parsing of octal int literals that is okay. Loosing both of my favourite offhand complaints would be rather disappointing. ;)
Re:HipHop VM: now at 98.5% PHP framework parity, 16% faster by userbinator on Thursday December 19, 2013 @11:31PM (#6939951)
Never seen that one, but I think it's cute.