[QOTD:Luis@IronPython-DevList] Python and Exploratory-Oriented Programming

by M. David Peterson

[IronPython] pybench results for CPython and IronPython

For me, the difference between python's dynamicity and Boo is simply
that python allows for a more exploratory way of development.


One of things that I have come to absolutely *LOVE* about IronPython is the interactive capabilities the 'intellisensed' console facilitates. Programming in "real-time" (AKA Read Evaluate Print Loop, or REPL) as opposed to statically compiling an application to then run the result has got to be the most powerful programming pattern we dev folk have in our development tool bags. Until just now, however, I hadn't thought of it in terms of "Exploratory Programming", but Luis has nailed it right on the head, as that's exactly what progamming in Python and/or any other dynamic language-based development environment is all about.

Nice!

4 Comments

will
2007-04-22 12:46:24
i don't buy it. a good solution is a good solution, and the solutions i see from repl-huggers are no better or more abundant than those i see from programmers who take the traditional approach.
M. David Peterson
2007-04-22 14:10:16
@will,


>> who take the traditional approach.


The traditional approach? I think you would be hard pressed to provide evidence that the tradition of programming a computer is built upon something other than a foundation of interactive programming techniques. Given that LISP is the second oldest language still in production use to this day, and given that LISP is built upon a foundation of Read Evaluate Print Loop, then suffice it to say that traditional computer programming was and is built on top of a REPL foundation.


That said, no where did I suggest that "REPL *RULEZ*, static compilers and their editor counterparts suck!" and instead, REPL (or to use the phrase that I now prefer, exploratory programming) has got to be the most powerful programming pattern we dev folk have in our development tool bags. Thats not to suggest that I believe that statically compiled languages don't hold a prominent position of importance, and instead that when you are in the middle of a brain storm session, and you want to try out an idea, using a REPL-based exploratory approach is a fantastic way to quickly and easily try out new ideas to see if they work.


For what I can only hope are obvious reasons, when it comes time to move from the research & development side of the equation to the production side, using the best tool for the job is obviously the right approach. And in *most* cases, the best tool for the job is a statically typed language that takes the now proven ideas developed using the more interactive approach and commits them to their most optimized state for long term production use.

will
2007-04-22 16:56:35
yes, there's a strong tradition of REPL/SLIME-like environments in some circles, but you're kidding yourself if you believe that's how most programmers work.


either way, my comment wasn't about tradition, it was about the code resulting from your "exploratory" approach being no better than the results of any other approch, be it flipping switches or punching cards. ultimately, the results are dependant on the programmer's mental facilities and not his tools or development environment.

M. David Peterson
2007-04-22 23:11:50
>> yes, there's a strong tradition of REPL/SLIME-like environments in some circles, but you're kidding yourself if you believe that's how most programmers work.


Where on earth did you come up with the notion that I believe this is how most programmers work?


Me: "This has got to be the most powerful programming pattern we dev folk have in our development tool bags."


You: "you're kidding yourself if you believe that's how most programmers work."


Me: "I didn't say this is how most programmers work."


You: "either way, my comment wasn't about tradition,"


Me: "It was partially, but if you want to claim otherwise even though the words are sitting right there in front of us, be my guest."


You: "it was about the code resulting from your "exploratory" approach being no better than the results of any other approch, be it flipping switches or punching cards."


Me: "Who said anything about flipping switches or punching cards, though now that you bring it up, I can guarantee you that anybody who has actually spent the time to learn programming via punch cards and flipping switches understands a whole hell of lot more about how computers actually work than those who have not at very least studied this phase of computer programming life cycle, and therefore are more likely to write more efficient code. But that's another post for another day..."


You: "ultimately, the results are dependant on the programmer's mental facilities and not his tools or development environment."


Me: "and this I just so happen to agree with, though tools can be helpful, especially when those same tools allow you to think unimpeded through a thought process without getting in the way."