Bitcoin Forum
December 04, 2016, 08:29:56 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Re: Looking for someone to create/modify software for this forum [1100+ BTC]  (Read 550 times)
jothan
Full Member
***
Offline Offline

Activity: 184


Feel the coffee, be the coffee.


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

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.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480840196
Hero Member
*
Offline Offline

Posts: 1480840196

View Profile Personal Message (Offline)

Ignore
1480840196
Reply with quote  #2

1480840196
Report to moderator
1480840196
Hero Member
*
Offline Offline

Posts: 1480840196

View Profile Personal Message (Offline)

Ignore
1480840196
Reply with quote  #2

1480840196
Report to moderator
1480840196
Hero Member
*
Offline Offline

Posts: 1480840196

View Profile Personal Message (Offline)

Ignore
1480840196
Reply with quote  #2

1480840196
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 2492


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

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:
Code:
//Assign "asdf" to the variable whose name is contained in $varname
$$varname="asdf";
Bitcoin Block Explorer uses this feature to create variables from the slash-separated data in the URL:
Code:
//creates variables like $param1,$param2, etc.
${"param".$number}=urldecode($item);

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: [1]
  Print  
 
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!