Bitcoin Forum
June 28, 2017, 06:03:23 PM *
News: Latest stable version of Bitcoin Core: 0.14.2  [Torrent].
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Re: Looking for someone to create/modify software for this forum [1100+ BTC]  (Read 590 times)
Full Member
Offline Offline

Activity: 184

Feel the coffee, be the coffee.

View Profile
January 24, 2012, 04:55:49 AM

Are you dead set on PHP? I know PHP, but I really am loving python.

For better or worse, PHP is the BASIC of the web, with all that it implies and I am in a good mood about PHP today. I speak from experience, I have used PHP extensively starting in 2003.

I have also, over time, called it:

  • A bad imitation of Perl.
  • The FORTRAN of the web.
  • Noob bait.
  • A poor replacement for Intel 8088 8 bit assembly.

When the PHP devs could have taken a good decision, they have almost always made the bad one. The result is:

  • No standard file to class name mapping (autoloader).
  • A single namespace.
  • No support for unicode strings without a clumsy external module.
  • A lot of extensions supported, but they sometimes have limitations that make them unusable.
  • The default embedded code in HTML is a horrible templating tool.
  • No exceptions thrown from functions that wrap system calls.
  • When a standard function has an error, it returns 0, null, false or something else entirely.
  • Inconsistent naming of functions, underscores CamelCase, nothing, guess which one.
  • Class system is a bad imitation of Java. Constructors cannot be overriden.
  • Poor runtime, no weak references, a daemon written in PHP will eventually run out of memory because of this.
  • Static context, everything, the web browser connection, the $_GET, $_POST cannot be separated from the runtime context. Everything is global and static. Compare with Python WSGI.
  • false == null, false == "", false !== null, this will slowly drive you insane.

Edit: I forgot to mention: useless dollars signs everywhere that remind you how much $ you could be making coding with any other language.

You will not regret picking any language over PHP. Python is heavenly compared to it.

Sorry for bashing, but this is hard-felt experience.

Bitcoin: the only currency you can store directly into your brain.

What this planet needs is a good 0.0005 BTC US nickel.
+50% Profit and more via TELEGRAM
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Hero Member
Offline Offline

Posts: 1498673003

View Profile Personal Message (Offline)

Reply with quote  #2

Report to moderator
Offline Offline

Activity: 2702

View Profile
January 24, 2012, 04:41:12 PM

PHP is my favorite language for small projects. It's far from the best language for any task, but it has so many built-in functions that you can do anything with it. I've even written a little Bitcoin network client with it.

No exceptions thrown from functions that wrap system calls.

You can use ErrorException to change this.

I forgot to mention: useless dollars signs everywhere that remind you how much $ you could be making coding with any other language.

There's a reason for this, though it probably could have been done in a better way. Text after a dollar sign is just a string representing the variable name, so you can do stuff like this:
//Assign "asdf" to the variable whose name is contained in $varname
Bitcoin Block Explorer uses this feature to create variables from the slash-separated data in the URL:
//creates variables like $param1,$param2, etc.

Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!