[#3109] Is divmod dangerous? — Dave Thomas <Dave@...>

14 messages 2000/06/06

[#3149] Retrieving the hostname and port in net/http — Roland Jesse <jesse@...>

Hi,

12 messages 2000/06/07

[#3222] Ruby coding standard? — Robert Feldt <feldt@...>

16 messages 2000/06/09

[#3277] Re: BUG or something? — Aleksi Niemel<aleksi.niemela@...>

> |I am new to Ruby and this brings up a question I have had

17 messages 2000/06/12
[#3281] Re: BUG or something? — Dave Thomas <Dave@...> 2000/06/12

Aleksi Niemel<aleksi.niemela@cinnober.com> writes:

[#3296] RE: about documentation — Aleksi Niemel<aleksi.niemela@...>

> I want to contribute to the ruby project in my spare time.

15 messages 2000/06/12

[#3407] Waffling between Python and Ruby — "Warren Postma" <embed@...>

I was looking at the Ruby editor/IDE for windows and was disappointed with

19 messages 2000/06/14

[#3410] Exercice: Translate into Ruby :-) — Jilani Khaldi <jilanik@...>

Hi All,

17 messages 2000/06/14

[#3415] Re: Waffling between Python and Ruby — Andrew Hunt <andy@...>

>Static typing..., hmm,...

11 messages 2000/06/14

[#3453] Re: Static Typing( Was: Waffling between Python and Ruby) — Andrew Hunt <andy@...>

32 messages 2000/06/16

[#3516] Deep copy? — Hugh Sasse Staff Elec Eng <hgs@...>

Given that I cannot overload =, how should I go about ensuring a deep

20 messages 2000/06/19

[#3694] Why it's quiet — hal9000@...

We are all busy learning the new language

26 messages 2000/06/29
[#3703] Re: Why it's quiet — "NAKAMURA, Hiroshi" <nahi@...> 2000/06/30

Hi,

[#3705] Re: Why it's quiet — matz@... (Yukihiro Matsumoto) 2000/06/30

Hi,

[ruby-talk:03468] [Ron Jeffries <ronjeffries@acm.org>] Re: [XP] What's wrong with strict typing?

From: Dave Thomas <Dave@...>
Date: 2000-06-17 03:15:30 UTC
List: ruby-talk #3468
Folks - the following message was posted by Ron Jeffries on the
eXtreme Programming mailing list. There's been a small thread over
there about static typing. This was his response.


Dave


From: Ron Jeffries <ronjeffries@acm.org>
Subject: Re: [XP] What's wrong with strict typing?

At 12:28 AM 6/17/2000 +0400, Pavel A. Perikov wrote:
>Reading comp.object I gotta impression that XP doesn't generally
>encourage strict typing. Smalltalk & Python is good, C++ sucks :) Is
>there any [semi-] official XP statement about strictly typed languages
>such as C++ (putting away other major drawbacks), Java, Eiffel etc?

I'm about as semi-official as you can get.

XP isn't language specific, although the things you have to do need to be 
adjusted. Strictness of typing isn't one of the issues, although the 
language contortions it takes to support strict typing may be.

Strict-typing languages like C++ and Java induce you to declare something 
in one place, then define it in another, then use it in a third. They 
generally won't let you use something before you go somewhere else first. 
It's a bit like having to pitch your tent every night before going to bed. 
It worked well for the nomads but it's not terribly efficient.

In addition, most implementations of these languages are compile-link-run 
in nature, rather than incremental compilers. This isn't necessary, but it 
is the way things turned out.

The effects of these characteristics are that (a) you have to edit in more 
places to do any given refactoring, and (b) as your program grows, it takes 
longer to install a change and test it.

The non-strict languages, such as Smalltalk and LISP and, yes, Python, 
throw up fewer of these obstacles. If refactorings allow you to change less 
code, refactorings are easier, quicker, less error-prone. If you can move 
from change to test in one second instead of 1 minute, you can make smaller 
changes, again reducing error.

In Smalltalk, there are some additional advantages. The ordinary Smalltalk 
browsers let you find and access things in ways that Emacs people can't 
even imagine. (Yes, I know, you can grep your source files. Smalltalk 
actually knows what it's looking at.) Even better, the Refactoring Browser 
actually knows how to DO the refactorings for you. It's a power tool for 
refactoring.

Languages like Smalltalk and LISP have yet another advantage. These 
languages are written in themselves. They are reflective, which means that 
there are Smalltalk or LISP statements that can manipulate the running 
code. This is a good way to kill yourself, but it also means that you can 
extend the programming environment when you need to. This isn't something 
for beginners, but it means that you can acquire powerful and valuable 
tools from experts, and integrate them into the IDE with ease. This, too, 
used with good judgment, speeds your programming.

The cumulative effect of all this is that a competent programmer in these 
languages can go faster than an equivalently competent programmer in the 
strict languages. Part of it is due to the cost of strictness, part to the 
toolset.

So ... XP is easier to do in Smalltalk or Python than in C++. It's still 
quite doable in C++, just not as fast and not at such a small increment of 
change.

Bottom line: There's nothing "wrong" with strict typing languages. It 
happens that they don't provide the most productive development environment 
- arguably for many things, and certainly for XP practices like refactoring 
and test-first design.

Just my opinion, of course ... but I believe a fairly expert one. And 
semi-official to boot.

Ronald E. Jeffries
http://www.XProgramming.com
"This path has been placed before you, the choice is yours alone."


In This Thread

Prev Next