Don & Cathy Kelly <d...@shaw.ca> wrote: > array oriented languages. Look at the power of a simple +/ vs the Python, > Fortran, Basic, C approach? Try out the 1 o. o.0.1*i.10 equivalent in > Python without writing a loop.
I don't think that's the big advantage... Python's code for that isn't much worse (I don't know, because I haven't bothered with the circle functions yet). Taking the risk of pretending that's a sin(), the code looks like this: [sin(0.1*x) for x in range(10)]. The serious advantage of J is that it's the product of intentional design as an executable notation. Python can't come close to J's consistency -- that little snippet I posted is from a corner of Python called "list comprehensions" that a programmer need not ever learn, whereas except for the o. notation your J snippet actually demonstrates a reality of the entire J language. > At the end of this rant- I hope that engineers do not really want a 'one > way to do it' approach- otherwise engineering becomes strictly by the book > which allows no room for innovation or improvement. That's not the point of Python's rule. The rule is that there should be one obvious way to do anything, and that way happens to be elegant and effective. This rule isn't intended to constrain programmers; it's intended to guide the language designers to keep them thinking about better ways to express their new idea. This is programming, and all our languages are Turing-complete, so there's always more ways to do anything than what the language designer intended. > Don Kelly -Wm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm