Yesterday I ran into something interesting in C#. The ability to make a class iterable and control it with the equivalent of getters and setters. It is kind of hard to explain. If I get a chase later I will post an example. While the almost the same effect can be achieved in PHP it would be a sort of hack. The feature is a bit of a novelty, but it can be practically applied. Although the actual gains would be obscure. A fun feature none the less.

The more I deal with strong typing it seems like less of a desired feature, and more of a hassle. It may make you feel like you are really being particular about the way your code operates, but all the overhead of casting variables back and forth seems like over complication. I especially think that this could be the bain of an online app. I think the Zend Engine was engineered in the right way when it comes to this. The very nature of the web and HTTP is all string/text based. For you to have to cast that to the right type, and then recast it to use it somewhere else in your app seems to be like dancing with a broom. Any performance gains from dealing with smaller variables is lost because you may end up re-casting that variable several times before the cycle ends. I guess this was deemed ok since the overhead really doesn’t matter too much in a client app. But who really writes apps that only one person uses at a time?

If a person is writing only web apps, I still think PHP skills are more Ninja like.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s