Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 02, 2016, 12:09:07 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)  (Read 9232 times)

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
I'm in the process of reading this, and even though I haven't finished yet, it has already proven itself as a "must read" as a great overview of the issue of static versus dynamic typing. (clarification: I finished the actual article, but I am following each link in turn and reading those as well. That is what is taking me so long. I think the article itself, along with following and reading the links, is what makes this a "must read".)

Quote
Angle Brackets and Curly Braces
Programming with "Duh" Typing
by Bill Venners
July 6, 2007

    Summary
    To what extent does the productivity of dynamic languages come from the lack of typed variables versus the reduction in "finger typing" required when you don't have to declare the types? The technique of type inferencing in static languages may shed new light on this old debate.

Over the years here at Artima we've had a number of debates and discussions about static versus dynamic typing. Here are a few:

    * Are Dynamic Languages Going to Replace Static Languages?, discussion of a weblog post by Robert C. Martin.
    * Typing: Strong vs. Weak, Static vs. Dynamic, discussion of a weblog post by Aahz.
    * Strong versus Weak Typing, discussion of an interview with Python's creator Guido van Rossum.
    * Implicit versus Explicit Dynamic Typing, discussion of a weblog post by Christopher Diggins.
    * To type or not to type, discussion of a weblog post by Jim Waldo,
    * Use the Best Tool for the Job, discussion of a short article by a younger me.
« Last Edit: July 09, 2007, 02:35:14 PM by tinjaw »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #1 on: July 09, 2007, 02:30:33 PM »
Nice reading --
Personally i think strong static typing is a very good thing, and dynamic typing is asking for trouble.

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #2 on: July 09, 2007, 02:58:06 PM »
Having spent the weekend playing with C++, I have been thinking today about why I have chosen the technologies/languages I have. The more I use different ones, the more I am developing a theory (I won't call it my own, because others have probably already discussed it) that the best answer is a combination of "the best tool for the job" and mastery of a particular development environment (tools plus language(s)). For example, in a heterogeneous enterprise environment Java might be the primary choice, but if I (and my team) are extremely proficient with C++ in Visual Studio, a .NET/Mono solution might be the best way for my team to go. (I should come up with a better example, but I can't think of one ATM.)

What I am leaning towards is dropping Java and making a stab at becoming proficient with two stacks: C++ on Windows using Visual Studio and Python on Linux using Eclipse with the pyDev extensions. Of course I don't plan on "forgetting" Java. I am sure that I will continue to be able to read and write it to the extent that I can understand examples using it and still get benefit from books on various subjects that happen to use Java as the language for demonstrating those subjects.

What do you folks think?

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,001
    • View Profile
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #3 on: July 09, 2007, 04:51:09 PM »
What I am leaning towards is dropping Java and making a stab at becoming proficient with two stacks: C++ on Windows using Visual Studio and Python on Linux using Eclipse with the pyDev extensions. Of course I don't plan on "forgetting" Java.
Assuming that you've got some reason for bailing on Java as the "go-to" technology for classical OO development (something I'd agree with but is certainly not clear cut), I wonder why you'd want to switch to C++. If you're already expert in that technology, then the learning curve does carry a fair amount of weight, but (having worked with it for years) C++ is hard, and if you're on the .Net/Mono platform you're probably not getting some of its key advantages (like kick-butt performance).

If you've got C++ and Java skills, and you're eying the .Net platform, I think you'd have to make a pretty strong case not to make C# the language to use in this context. The basic structure of all three languages is quite similar. And C# is unquestionably simpler than C++, and it's designed to integrate with the .Net platform (e.g., the "using" keyword for the IDisposable/finally pattern).

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #4 on: July 09, 2007, 05:35:48 PM »
Assuming that you've got some reason for bailing on Java as the "go-to" technology for classical OO development (something I'd agree with but is certainly not clear cut), I wonder why you'd want to switch to C++.
I have a one word answer for you, "Games".

At this time I am at an intermediate stage with C++, Java, and Python. I have never been a full time programmer, but over the past 15 years I have been on a roller coaster ride with languages, tools, and proficiency levels. At my peak I was a senior developer support engineer for Delphi at Borland, at my lowest, I wasn't even in the software business. So I have learned and forgotten much over the years.

Currently my focus is on two areas. The first is general hobby programming. The kind of stuff that would be a coding snack.  I'll do that stuff in Python. As well as Python for general utility programming.

The second is on commercial games and military simulations. For that C++ is where 90%, or more, of the existing code base is.

But, yeah, if I was in the business/enterprise world I would go Java or C# .NET for compiled coding and Javascript or Python for the other stuff.

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #5 on: July 10, 2007, 06:06:33 AM »
That is a very interesting article. Another article on the same site gives a sneak peek at C++0x. It is worth a read as there are plans (it would seem) to introduce an auto keyword for type deduction.

How long it will take for us to have compilers which support this is a whole other issue, the standard itself isn't finished yet.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #6 on: July 15, 2007, 05:44:37 PM »
Cédric Beust responded to the Artima discussion and lists some links that discuss why static typing may be preferred:
http://beust.com/web...archives/000454.html

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #7 on: November 18, 2007, 08:14:35 PM »
You might want to take a look at Jython the next time you are thinking about Java, since you are a lover of Python.

Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #8 on: November 18, 2007, 09:17:42 PM »
Typed variable
Then I typed it in again
Allocated twice

Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #9 on: November 18, 2007, 09:21:19 PM »
Weak variable
Sometimes a string, sometimes int
make up your damn mind

Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #10 on: November 18, 2007, 09:24:01 PM »
Strong versus Weak type
Makes some programmers crazy
But the code won't care

tranglos

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,079
    • View Profile
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #11 on: November 18, 2007, 10:54:26 PM »
weak vars are pointers
like following a road sign
that's blank, to nowhere

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #12 on: November 19, 2007, 10:51:33 PM »
Why did this post topic reply notification come up with a https:// prefix instead of http:// ?
- carpe noctem

Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #13 on: November 20, 2007, 08:44:11 AM »
Why did this post topic reply notification come up with a https:// prefix instead of http:// ?

More importantly, what happened to your original post?

tranglos

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,079
    • View Profile
    • Donate to Member
Re: It's A "Must Read" - Static Versus Dynamic Typing (A great overview)
« Reply #14 on: November 20, 2007, 10:53:34 AM »
Why did this post topic reply notification come up with a https:// prefix instead of http:// ?

More importantly, what happened to your original post?

I thought that was haiku overload.

Perhaps so is the sudden change to https. The server became partly sentient and instinctively reached to protect its, um, privacy.