DevPinoy.org
A Filipino Developers Community
   
Does your programming language enable you, or hinder you?

Computer programming languages have evolved through the years to enable programmers to do tasks, and do them faster. Otherwise, we would all be stuck programming in native machine language. While some of you may find that fun, I don't. Stick out tongue

Lately I've begun to evaluate the programming languages that I know and use, on whether they enable me to do things or hinder me from doing things. Let's take strong typing for instance, a hallmark of compiled languages like Java and C++. Does it enable the programmer, or does it hinder the programmer when it comes to creating code? Though strong typing is sort of a "safety net" that helps the programmer in catching errors at compile time, I'm realizing that it actually puts roadblocks on our way. Added language features like generics and interfaces to me now seem more of a hack than genuine language enablers. Generics don't make sense in dynamic programming languages, and neither do interfaces, for instance.

I'd like to expound on interfaces as implemented in Java and C#. They're supposed to make it possible to refer to objects polymorphically as long as they implement an interface, regardless of their class inheritance. So why did interfaces become "necessary?" Simply because the people who designed the programming language concerned chose to use class inheritance as a means to enforce strong typing. In its pure form, inheritance is supposed to enable reuse at the class level, by allowing subclasses to make use of code already written for their base class. I'm pretty sure it was not meant to be a means to enforce strong typing. I really don't know why that came to be, since it was already so when I started learning OOP with C++ and Turbo Pascal 5.5 years back.

I'd also like to rant on PHP. As you may (or may not) know, I used to be a fan of this language. Now I seem to admire it less. PHP is a dynamic language, but it's shackled by its C/C++ roots and lately by its Java influence (in PHP 5). Too bad. Now it's like a dynamic language that is trying hard to fit in the static language crowd. I'm not impressed by what PHP 6 is promising to bring to the table too. I'm starting to move away from it now. Sad, I know.

Ah, I'm dreaming of a time when I can use a dynamic language at work...


Posted 08-08-2007 2:23 PM by cruizer
Filed under: ,

Comments

lamia wrote re: Does your programming language enable you, or hinder you?
on 08-07-2007 10:55 PM

<rant>

I hate PHP's OOP implementation!!!

</rant>

Jon Limjap wrote re: Does your programming language enable you, or hinder you?
on 08-07-2007 11:25 PM

Are you having some... umm... Ruby-envy, bushing?

jop wrote re: Does your programming language enable you, or hinder you?
on 08-07-2007 11:42 PM

"Ah, I'm dreaming of a time when I can use a dynamic language at work..."

And you can! There is a very powerful language that exists on virtualy all PC's (that includes Macs, Linux and even some handhelds too). It is a dynamic language . It supports procedural, object-oriented and functional programming styles. It is easy to learn and not so very to master. It is free and mainstream.

What language fits this description?

cruizer wrote re: Does your programming language enable you, or hinder you?
on 08-07-2007 11:45 PM

lamia, you must be referring to PHP 4. PHP 5 looks like ... Java with dollar signs! :P

jop wrote re: Does your programming language enable you, or hinder you?
on 08-07-2007 11:46 PM

"Are you having some... umm... Ruby-envy, bushing?"

...there is a lot to be envious about. :D

cruizer wrote re: Does your programming language enable you, or hinder you?
on 08-07-2007 11:54 PM

hmm...are you talking about JavaScript, master? Wink

jop wrote re: Does your programming language enable you, or hinder you?
on 08-08-2007 12:10 AM

"hmm...are you talking about JavaScript, master?"

Tumpak!

Of course, the libraries are not the best and it can use a development environment that can compete with Eclipse, IntelliJ or VS.NET - still, it is a very powerful language that is very under utilized.

Jon Limjap wrote re: Does your programming language enable you, or hinder you?
on 08-08-2007 12:52 AM

Hehe, Javascript seems to be the language of the past, the present, and the future, and it was under our noses all along.

lamia wrote re: Does your programming language enable you, or hinder you?
on 08-08-2007 1:13 AM

OOP in PHP 5? Like how do you perform polymorphism in it? I don't think I'd be able to use OOP in PHP effectively unless I use a framework like Code Igniter.

Javascript is indeed one powerful language. I was laughing at one time when I was able to evaluate all the methods an object contained(I blogged about this). I said to myself, "Aba, built-in intellisense sa language" hahaha!

I dunno about Ruby. What I've seen so far wasn't good enough to impress me. But I guess I'll have to try it on my own someday so I won't be complaining all the time. Lolz!

cruizer wrote re: Does your programming language enable you, or hinder you?
on 08-08-2007 1:43 AM

of course polymorphism is possible in PHP 5, even with PHP 4. like I said before, PHP 5 OOP is almost Java-class already ;)

to me polymorphism shouldn't be restricted to classes that have a common ancestor. polymorphism should extend to any class that has a matching method and signature regardless of hierarchy. for example if you have a class Faucet with a method TurnOff() and you have a class LightSwitch with a method TurnOff(), you should be able to refer to a Faucet or a LightSwitch and be able to call its TurnOff() method (message) anytime. the Faucet and LightSwitch classes might have completely different inheritance hierarchies. with Java and C# the way to allow this is to declare an interface with a TurnOff() method but that would require rewriting your Faucet and LightSwitch classes to implement the interface, wouldn't it?

JohnDR wrote re: Does your programming language enable you, or hinder you?
on 08-08-2007 8:06 AM

We use tons of perl code here at work and it enables us to do lots of productive work, that is, there is no *type casting* in perl.

undetected wrote re: Does your programming language enable you, or hinder you?
on 08-08-2007 9:50 AM

Right on! I've encountered that interface thing a bunch of times already.  As far as dynamic languages, hmm, it's a nice coincidence that you're coming to this realization around the same time that I am.

Hey, at least you use C#, which is Java + Anders Hejlsberg.  I'm still on Java.

undetected wrote re: Does your programming language enable you, or hinder you?
on 08-08-2007 9:56 AM

I see a lot of people take JavaScript more seriously now, particularly because of Ajax and Google.  I always thought it was unfair that JavaScript got such a bad rap just because people did ugly things with it.  Ngayon parang naisip nila, teka, you can do good things with JS din pala!  Well, DUH!

I think Google really deserves a great deal of credit for making people realize this.  When GMail first came out, I actually sent them feedback thanking them for actually utilizing the JS engine in my browser in a way that actually benefits me.  Little did I know they've only just started.

Jon Limjap wrote re: Does your programming language enable you, or hinder you?
on 08-10-2007 1:56 AM

Bosing!

Something to enhance your Ruby envy:

blog.objectmentor.com/.../craftsman-51-brown-bag-viii-ruby-visitor

Natuwa ako dito (I usually don't understand the Craftsman series). Off topic I also got amused to the reference to Eumir Deodato's Also Sprach Zarathustra. :p

cruizer wrote re: Does your programming language enable you, or hinder you?
on 08-10-2007 2:43 AM

nice find ;) that's not the only benefit you can gain...

Copyright DevPinoy 2005-2008