Exploratory programming is an important part of the software engineering cycle: when a domain is not very well understood or open-ended, or it's not clear what algorithms and data structures might be needed for an implementation, it's useful to be able to interactively develop and debug a program without having to go through the usual constraints of the edit-compile-run-debug cycle. Many languages provide support for exploratory programming via interactivity, dynamicity, and extensibility, such as Cecil, Dylan, Factor, F#, Java,Lisp, Mathematica, Obliq, Oz, Prolog, Python, REBOL, Perl, Ruby, Self, Smalltalk, Tcl and Javascript.
For some software development projects, it makes sense to do a requirements analysis and a formal specification. For other software development projects, it makes sense to let the developers experiment with the technology and let the specification of the software evolve depending upon the exploratory programming.