Welcome, Guest. Please Login
 
  HomeHelpSearchLogin FAQ Radified Ghost.Classic Ghost.New Bootable CD Blog  
 
Pages: 1 2 3 4 
Send Topic Print
PHP and regular expressions (Read 62473 times)
Nigel Bree
Ex Member




Back to top
Re: PHP and regular expressions
Reply #45 - Jun 19th, 2008 at 8:49pm
 
Rad wrote on Jun 19th, 2008 at 8:37pm:
This guy invented *both* C and Unix?

They co-evolved together, almost inseparably, and really only the main principals know precisely who did what. From outside, Dennis Ritchie, Brian Kernighan, and Ken Thompson may as well have been a single hive mind.

Great quote from Ken Thompson, snagged from this page with more background.
Quote:
That brings me to Dennis Ritchie. Our collaboration has been a thing of beauty. In the ten years that we have worked together, I can recall only one case of miscoordination of work. On that occasion, I discovered that we both had written the same 20-line assembly language program. I compared the sources and was astounded to find that they matched character-for-character. The result of our work together has been far greater than the work that we each contributed.

 
 
IP Logged
 

Nigel Bree
Ex Member




Back to top
Re: PHP and regular expressions
Reply #46 - Jun 19th, 2008 at 9:03pm
 
Rad wrote on Jun 19th, 2008 at 8:11pm:
So .. it's not defined obviously solely by being inside/outside

Sure, but internally to the PHP system a $ outside a string and a $ inside one have to be treated by different code; the situations deliberately look similar so that there are less things to learn, but the language has to work quite hard to maintain that illusion.

Internally to the language, what it does in order to make this magic happen can have odd consequences. This makes it hard to intuitively know what the fastest of all the dozens of equivalent ways of doing the same thing are, but because almost everything does work it's much easier to write something and have it be useful.
 
 
IP Logged
 
Pages: 1 2 3 4 
Send Topic Print