It has been a long time coming for me to switch out of PHP for my main programming language. I have been working with PHP for years and have grown tired of the limitations/issues. It has been hard for me to convert, being that there are always jobs for PHP programmers out there and I gotta eat! For me, the aggravation coming with working with PHP has forced me to switch.
Why do you hate PHP?
I don't hate PHP at all. The language itself has many advantages like a great community, numerous libraries (although how many different MVC frameworks can you have?), great documentation, and ease of entry. There are libraries to connect PHP to virtually every database, REST API, or other third party software. These are all reasons I began using the language in the first place.
PHP is supported on virtually every web hosting company on the planet, making PHP a useful skill to have. There are some great open source frameworks and apps like WordPress, Zend, Joomla and too many others to list.
Why no more PHP? First, I should probably clarify that I will continue to use PHP as many of the projects I'm working on still use PHP. However, there are many quirks about PHP that have been bothering me. I won't go into detail because I will not be saying anything new about the subject. If you want to read the most epic of rants on PHP issues, see this post.
PHP code, especially large code repositories, have become difficult for me to enjoy maintaining. Sometimes your app just stops working because of some typo in your code or the spaghetti code becomes just too unreadable.
PHP just doesn't seem exciting for me anymore. There doesn't seem to be anything exciting happening. Yes PHP 5.4 was recently released which has the new Traits feature, but other than that, not much has been happening with the language and nothing interesting as far as apps or frameworks. The only object that piqued my interest was Laravel.
Why not Python/Ruby/Java/Any Other Language?
like to consider myself open to trying new programming languages. Even
if you don't wind up using a language long term, sometimes your
programming skills can still benefit from solving solutions from a
different point of view. Below is a quick overview of my dealings with
other languages. Most were brief enough that they shouldn't be taken
Python - I have no problems with Python. I have completed a couple of projects in Python and find it a joy to work with.
- My only experience was with Ruby On Rails around version 0.9.3. At
the time, the framework made coding easier but at the expense of
performance. Scaling was terrible at the time.
Node- This seems to be all the rage. Everybody likes to
use the term "Non-Blocking" to make themselves seem cool. The draw is
to be able to code the same language client side and server side and
even share that code so you don't have to write validations in two
places. Node is still young but provides ample libraries with a large
developer community already.
Java - Too bloated for me and if I use it there is a possibility Oracle might sue me!
C - I mostly used it in school and haven't had the need to use it since.
C# - This language seemed well thought out, but I am not into using .NET products and Mono just wasn't a viable solution for me.
are some languages that I would like to still try (for various
different reasons) like Clojure, Scala, Dart, Smalltalk, Erlang, and Haskell.
I will get to them when I can.
Why is Go the Shiznit?
Go makes me a better coder! I enjoy coding more with Go and was productive very quickly. The documentation was complete and organized. The support forums are great and are frequented by the core contributors of the language. Effective Go is a great way to get started with Go.
I like the multiple return values instead of exceptions which forces you to deal with errors right away.
Some people don't like static typing and strict compilers, I do. It saves me a lot of debugging time and prevents my program from crashing in a rare use case. The compiler will tell me if I declared a variable and didn't use it or tried to use an undeclared variable, both signs that I have probably made a typo somewhere. The compiler is very fast! Large apps can still compile in under half a second.
Since I'm not a sysadmin, I prefer to pay extra to have my code managed by someone. Besides Google App Engine, people have implemented Go on Heroku and OpenShift.
Although I haven't used it, Go's concurrency model seems straightforward and easy to use.
Interfaces and reflection are awesome. Takes a little getting used to, but once interfaces click in your head, you'll be hooked. There is a blog post that sums interfaces/reflection up better than I can at http://blog.golang.org/2011/09/laws-of-reflection.html.
Go helps me write cleaner and more maintainable code. Now that Go 1 has been released, the code base has really stabilized, allowing me to feel more confident about using Go in a production environment. The maintainers of Go say: "People who write Go 1 programs can be confident that those programs will
continue to compile and run without change, in many environments, on a
time scale of years."
Since there are millions of PHP users and six people who read this blog (Hi Mom!), I doubt that I will cause of a shift of PHP users to use Go, but maybe the next time you have a project that is a fit for Go, you will give it a try! You can create Google App Engine projects for free to help you get started.