Re: Obstacles for Tcl/Tk commercial application development ?
- From: Darren New <dnew@xxxxxxxxxx>
- Date: Fri, 01 Feb 2008 21:49:39 -0800
Óscar Fuentes wrote:
Lets suppose you are developin the Rally Big Piece of Software, and at
certain point you decide that certain data location, that until now
holded a bare integer, it's better represented as pair of integers. You
have a problem: locating and changing an undetermined amount of code
that makes use, directly or indirectly, of that data.
On static type systems, this is no problem: the compiler will refuse to
give you an executable until you fix all cases. In dynamic type systems,
you must resort to runtime tests (which are not conclusive) to do the
work, case by case, until you fix everything.
Actually, this isn't all that true.
Say you define a data structure that contains two coordinates.
struct Point {int x; int y;}
You have many places in your code where you calculate
distance = sqrt(p.x*p.x + p.y*p.y);
You then change struct Point to be a 3D point. Now you need
distance = sqrt(p.x*p.x + p.y*p.y + p.z*p.z);
The compiler isn't going to give you type errors. You *still* need to encapsulate stuff so your distance calculations can be found.
Now, with a sufficiently statically-typed language, you might be able to ask the IDE to point out all the places you have variables of that type whose members you access or some such, sure. But you're not going to get a compiler error if you for miss one of the distance calculations.
Bad style? Sure. But that's the point. Encapsulating changes is how you make dynamic typing work.
I come to the conclusion that *every* feature of software development is targeted at reusing code or putting everything you need to know in one place.
--
Darren New / San Diego, CA, USA (PST)
On what day did God create the body thetans?
.
- Follow-Ups:
- Re: Obstacles for Tcl/Tk commercial application development ?
- From: Óscar Fuentes
- Re: Obstacles for Tcl/Tk commercial application development ?
- Prev by Date: Need help on Tablelist
- Next by Date: Re: Embed the Tk Console in a Tcl/Tk application
- Previous by thread: Re: Obstacles for Tcl/Tk commercial application development ?
- Next by thread: Re: Obstacles for Tcl/Tk commercial application development ?
- Index(es):