× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 2/4/2011 2:33 PM, Bryce Martin wrote:
Joe,
I love your enthusiasm and you make sound arguments. But there are two
HUGE assumption being made. The first is that Static typing is
neccessarily better for web development that Dynamic typing. The second
is this assumption that just because a language lets you shortcut then
that you should just not even consider it. Have you ever programmed in
C++??? (rhetorical, I'm sure you have). You think you can do some dumb
stuff with PHP, well you should see what can be done with C++. When it
comes to using the language its about the programmer. You can use a car
to do nasty things, but I choose to drive between the lines.

I really think your argument boils down to static vs dynamic typing. It
doesn't matter to me, I like and use both of them.


Yep, did a lot of programming in C++. In fact, we did a lot of programming in C where we emulated C++, using pointers to "objects". We called them handles, but they worked the same. You can actually do the same thing in RPG. Short of polymorphism (which really isn't used as much as you would think), there's not much you can do in an OO language that you can't do in a procedural language (and you can do polymorphism if you REALLY want to, but it's way more trouble than it's worth). The beauty of a true OO language is that it forces you to do OO right.

C++ was hampered by the fact that it needed to be a complete superset of C; you had to be able to compile your old procedural C code in the same compiler as your OO C++ stuff. In that way, it's very much like PHP because OO and procedural have to coexist, and the problems are just the same. As you've pointed out, you can do any of your old, bad C programming in C++. Java is different: designed fro the ground up to be OO, it enforces a lot of the programming practices that tend to get cut short in quick and dirty programming. (Another issue is the fact that OO has a singly-rooted OO hierarchy while C++ does not, but we won't go there <grin>.)

As to static vs. dynamic, I am simply dead-set against dynamic typing for enterprise development. The simple example I showed in my article is enough for me. You can pass a string to a function expecting an integer and you won't even see an error until run-time, if at all! I've kept quiet on most of this discussion, but when I heard people getting all high and mighty about the LDA who at the same time praise the simplicity of PHP, I just had to weigh in.

I can't understand how someone could diss the LDA but yet be a fan of dynamic typing. I said PHP is the LDA of programming, but to be more precise dynamic typing is the LDA of programming. Even Basic knows the difference between an integer and a string! :)

Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.