Tim Churches wrote:

On Fri, 2004-04-16 at 13:51, Thomas Beale wrote:


The way all the Eiffel stuff works on every platform is simply bridge pattern all over the place, plus platform specific binding libraries.



Ah, yes. Gang of Four patterns are (largely) hacks required by static typing languages to work around their limitations... with dynamic typing in Ruby, Smalltalk, Python, (etc) most of the patterns are redundant (or at least, trivial to implement).

Just joking...at least partially.


I can't resist one reply...take the following as the comments of an unredeemed user of typed formalisms;-)

when I originally started in real-time control systems (power stations, gas pipelines etc) we wrote everything in C and assembler. Every so often someone looked wistfully at Objective-C, Smalltalk and other OO languages of the time (I wouldn't have minded using Simula actually...). Smalltalk was of course the purest in approach, but we never touched it because we knew that we would never be able to convince ourselves that the system would behave properly when actually deployed, since we knew that there was no compiler checking of types, which would have meant being able to devise every possible test case covering situations where messages were sent to the wrong object. I must admit I still have the same worry about untyped languages today.

Two comments about untyped languages:
- one phenomenon which you see quite regularly is disciplined naming of variables with pseudo-type information in them, e.g. intPacketCount, packetRequest etc. This in my view is a sign that typing really is needed, and that the programmer is being forced to make up for its lack. (I know that strong typing of 'datatypes' exists in languages like Python, so ints, lists, dictionaries should not be an issue there. But then why having typing for some things and not for everything else?)


- trying to define a model representing a design without types borders on the impossible. Most people would define a typed model, and certainly the notion of types is part of all the object-oriented modelling languages I have ever seen. (Pure functional modelling is of course possible, but makes it hard to think about things when you have no encapsulation or inheritance). So, once you have your model, why implement it in an untyped implementation technology? Why throw away half the knowledge contained in the model when it could be easily used to check program correctness?

As for GoF patterns, I can't say I use that many of them, but certainly patterns like bridge, singleton etc are extremely useful, and I can't see their meaning disappearing regardless of what language is used to implement them - the principle remains.

I am quite interested to know why so many people use Python - what's its attraction for building large software (not little scripts; I've done enough Perl to see that Python is much nicer for that)? I'd be interested in knowing the main reasons why everyone chooses a certain language in health systems actually. (My personal nirvana is a typed, oo/functional language, close to a structured mathematical logic, but with good tools, and the ability to write "hello world" without needing brain surgery. I guess someone will write it one day, and get us all out of the terrible mire we're in now;-)

- thomas




Reply via email to