Teaching Children Programming and Linux
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Sun Jul 20 19:28:29 UTC 2008
On Sat, Jul 19, 2008 at 01:34:49AM -0400, Christopher Browne wrote:
> It seems to me that the whole "abject orientation" fixation has been a
> terrible distraction from the *real* problems of computer science.
> OO is simply a way of structuring the relationships between functions
> and data, which is merely a programming technique. You can do it in
> any language, if you plan for it a little. It's even doable in
> assembly language, albeit that's not likely a way people will be too
> excited about doing much of anything :-).
If you want to help someone learn to program, then help them learn math
and forget object orientation ever was thought of. Programming is about
specifying what has to be accomplished, not controlling which bit is
used to store what every moment in time. Or at least it should be.
> There are a number of useful paradigms that OO seems to distract people from:
> - As Lennart observes, functional programming is of considerable
> interest. It allows *provably* establishing independence of instances
> of functions, which is *staggeringly* interesting as the need to
> enable parallel execution grows (in keeping with the number of CPU
> cores on each motherboard).
> This is why people have been taking interest in Erlang, of late; even
> though it has the unusual syntax of Prolog, its capability to
> guarantee safety of running functions in parallel is exceedingly
> useful in building highly concurrent applications. It was created for
> coding phone switches, certainly an example of hefty concurrency.
It also has a heavy interest in being able to prove that each line can
be handled independantly of the other lines. Makes scaling to more
lines simpler. Being able to test a function because it takes
arguments, can not in any way change the value of its inputs or any
other state of the system, and simply returns new data is very useful,
Testing and proving the functionality function by function rather than
trying to test a program as a whole is a lot simpler.
> Harnessing parallelism is one of the "grand challenges." OO hasn't
> got anything much to contribute in that regard, conceptually. Indeed,
> by binding state and methods together, implementations frequently add
> to the challenges, as opposed to helping to resolve them.
Certainly most OO languages make this much harder. I still think Java
is fundamentally a disaster by design.
> - Typical OO implementations focus heavily on building data type
> taxonomies, and then on building per-type sets of methods. ML (yet
> another flavour of functional languages) instead uses type inference,
> with type polymorphism, which chops out the need for whole branches of
> method taxonomies.
I love the strong type system in ML, and the fact that lists are native.
All languages should have native list support.
> - Another of the "grand categories" of solutions is declarative
> programming. Notable instances include SQL, Prolog, Erlang, and
> Haskell, most of which, again, are functional languages. The idea
> here is to write programs that ask to calculate a result, as opposed
> to indicating how to do so.
My wife says ML reminds her of prolog. I can't see the relation myself,
but then again she is much better at prolog than me byt a lot.
> It is becoming increasingly clear that for a system to be deeply and
> tightly coupled to "object orientation" is, anymore, something of a
Absolutely. Microsoft even created their F# language with a clear
objective of making parallel execution simpler to achieve.
> That's not prejudice against Smalltalk, by any means; I did *not*
> pre-judge it in any way. I watched it, with interest, when Byte
> presented on it back in 1981. It was not until rather more recently
> that I had opportunity to try out Smalltalk in running form, and I
> have always found myself disappointed at how the learning curve of the
> environment discouraged me from getting to the point of trying any of
> the things that had always seemed interesting about it.
> If anything, I have been predisposed to look favorably on Smalltalk.
> But its design isn't cognizant of the 30 years worth of new concepts.
Smalltalk is an interesting system, although I doubt it has anything to
offer when it comes to taking advantage of future computer designs.
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy