Jan,
On Wed, Mar 27, 2013 at 1:49 PM, Jan Mercl <
0xj...@gmail.com> wrote:
> On Wed, Mar 27, 2013 at 12:57 PM, Sebastien Binet <
seb....@gmail.com> wrote:
>> yes, is that a bad thing ? :)
>
> Well, IMO yes ;-)
>
>> the playground is great.
>
> Yes. And it's not an interpreter.
>
>> go run is great.
>
> go run is a handy tool. It is heavily abused for things completely
> different than what is was intended for.
>
>> the various go-repls which compile+run on-the-fly are great.
>
> I know one C REPL. I know zero people which ever used it. Both C and
> Go are statically type checked
> compiled-to-machine-code-for-great-performance languages. No serious
> developer is probably developing anything substantially more complex
> than hello_world.c in a C REPL. Why should be Go any different?
high energy physics people would beg to differ.
CERN has a long history of developing interpreters (COMIS for FORTRAN,
CINT for C/C++ and more recently (and less buggy) CLing for C/C++
(based on LLVM/CLang))
interpreters have been the "bread and butter" of scientific investigatory work.
you somehow load your data file, write little functions to inspect,
iteratively refine and plot data, or create new analysis algorithms to
extract information(s) out of the TB of data: that's best done in an
interpreter where you can iteratively inspect and modify the state of
your program.
(of course, theoretically, one could save/dump the state of a serie of
programs, analysis-step-00-to-01, -01-to-02,... saving the interesting
data for later re-use, and the reflect+json/gob/whatever do make this
job easy, but that's a lot of scaffolding you get for (almost) free
with an interpreter)
usually, the little functions end up being PhD theses and eventually
also end up in the physics experiment's official code (which, for
obvious reasons of performances, has to be compiled)
not having to write your prototyping code in one language and then the
production-ready one in another one is just plainly nice (physicists
usually can't be bothered to learn one programming language, so, 2 ?!)
to be completely honest, it is true that thanks to completely
effortless way of compiling 3rd-party packages provided by go get and
the Go ecosystem in general, the tediousness of the compile-run-edit
cycle one is familiar with in C/C++ does not hold in Go (and so is a
rather enjoyable experience, IMHO)
>
> Frankly, I consider the idea of simulating (to some extent) Go REPL by
> "compile+run on-the-fly" even uglier than a proper REPL per se.
I can't say I disagree.
-s