On Mon, Aug 06, 2007 at 07:26:05PM -0400, Prof David West wrote: > > We probably agree on almost everything - especially at the level of > programming language comparisons (except the matter of typing which is > beyond the pale- the supposed benefits are totally illusory, IMHO, for a > variety of reasons). >
I'm sure this point has been done to death by wiser heads than I. I can only comment that in practise, I have found strong typing helpful in managing complexity. I would hate to write anything really complex in Perl, for instance, but for simple stuff it is fantastic not to have to worry about typing. > For me, design is everything and a programming language is judged almost > exclusively on how easy it is to directly express the design. (A > secondary consideration is the ease with which the language allows > iterative and exploratory development which excludes all compiled > languages.) Interestingly, with EcoLab, I achieve this latter requirement by adding an interpretive environment to the compiled core. It may not be elegant in the sense Eiffel has an elegant compiled/interepreted hybrid environment, but it does work, and is efficient (or at least can be with care). > > As for where the designs come from - mostly observation and adherence to > a few heuristics - almost all of which were espoused by (but not > necessarily followed by) the early proponents of OO. > > Some example of how object designs differ: > > If you are writing software for a vending machine - money arithmetic > belongs with the money object not an accumulator or a counter object, if > you are writing software to operate a brewery, design should proceed > from the point of view of the beer seeking to leave a vat and enter a > mouth instead of the perspective of the "control room" monitoring the > bottling line, if you are writing mathematica, your design should be > based on expressions that know how to modify and solve themselves (self > evaluating rules is the generic design) instead of any form of > "calculator" object. > I had a lot of experience with SMP, a precursor to Mathematica. Nice language, wonderfully expressive. But if you couln't express your problem procedurally, you're so out of luck! > You can sometimes tell if your design is OO by looking to see if you > have certain structures in your code: case statements for example will > not exist (or be needed) if your design was OO, loops will never be > explicitly coded (instead you will send messages like "do" and "select" > to collection objects, and, if you are using an interpreted VM based > language, your code should be modifiable at run time - no need to "bring > it back to the shop" for modification, recompilation, relinking, and > re-distribution. You make this sound like a big deal! > > Russel -- if you would like to chat about design off-line where we do > not bore the others -- please email me. You can give me a problem, I > will give you an OO design, and we can discuss its problems or merits. > People have threaded email readers. They can ignore this thread if not interested. But there will be some who are. I'll take you up on this. I have a problem. I want to express a discrete space by a variety of tiling patterns, eg von Neumann, Moore, and hexagonal (spherical close packing) in 2D and 3D. The fundamental cell type has a method returning something with collection semantics, ie has a begin(), end() and size(), which represents the neighbours. Iterating over the neighbour list returns references to the relevant cells. Whilst this can be implemented as an ordinary graph, for memory efficiency, it needs to be implemented as patches, with each patch wired up into an appropriate graph topology. I think I have a solution to this, but I haven't coded it yet. But it definitely requires a switch statement, and for loops. I'd be interested in your design though. Cheers -- ---------------------------------------------------------------------------- A/Prof Russell Standish Phone 0425 253119 (mobile) Mathematics UNSW SYDNEY 2052 [EMAIL PROTECTED] Australia http://www.hpcoders.com.au ---------------------------------------------------------------------------- ============================================================ FRIAM Applied Complexity Group listserv Meets Fridays 9a-11:30 at cafe at St. John's College lectures, archives, unsubscribe, maps at http://www.friam.org
