I can definitely say the REPL has helped learning Scala, where sometimes the 
IDE doesn't quite "get" the syntax 100%, and I needed to poke it a bit.  
Scala's syntax is a bit obscure at times (particularly for a n00b), so for me, 
the REPL is pretty handy.  I recall a poll on slashdot asking what people used 
as a calculator and the python shell was one choice, more than a few picked it, 
including myself.  The javascript console in Webkit is also pretty damn handy.

As far as a teaching tool goes - I know I'm always learning new stuff, even on 
a language I already have familiarity with -- there are still parts I'm not 
about to just spew out 100% rote, so I guess, despite originally thinking that 
I didn't find REPLs all that useful, I'm finding myself defending them, 
realising I use them more than I thought.

Thinking about it, at some point the line between debugging and learning gets 
blurred.  If you created a program that doesn't work, you have to learn what 
went wrong, or you see that the original structure was sub-optimal and you have 
to come up with a new approach, sometimes requiring the use of new structures 
or techniques that can be explored either within the context of debugging or 
within a REPL.

I'm not sure a REPL is really the foremost argument for picking a language as a 
starter language.  I think even a simple choice can depend on the audience, 
have you ever seen a math PhD write Java for the first time?  It's madness, 
they should have been handed Scala or another functional language - it would 
have been less torture on the poor developers who came after!  The nine year 
old who is curious might perhaps not do so well with C either, but perhaps for 
an undergrad it might be a good choice where they have a structured lecture 
series where they can come to grips with the "pixie dust" with some assistance.

Alex

On Dec 24, 2011, at 2:59 PM, Dick Wall wrote:

> OK - let's see if I can get this straight.
> 
> On Saturday, December 24, 2011 7:19:53 AM UTC-8, Reinier Zwitserloot wrote:
> ]Sure, that sounds about right. I open my scrapbook (which is the exact same 
> thing as a REPL, just not called a REPL - you've apparently missed the point 
> but I'll get into that next paragraph) about a tenth as often as you do, but 
> then, java is easier to understand so there's less for me to try out.
> 
> 
> REPLs are useless, but something not called a REPL built into eclipse is 
> super-useful and you use it all the time despite being an experienced java 
> developer. The only difference seems to be the name. I would posit that I am 
> not the one who missed the point here.
>  
> 
> 
> Here's where you missed the point. Yes, what REPLs do is very handy. But I 
> don't have to use a spoon to eat soup; I can use a spork as well.
> 
> 
> I use a spoon, always, to eat soup. Even camping. It's just a better tool for 
> the job. I don't think I missed a point. You said REPLs were useless for 
> anything except beginners. I said they were not. You seem to back up my 
> position with scrapbooks.
>  
> java has no REPL. But eclipse has scrapbook pages. These do everything REPLs 
> do and more. It's almost exactly like sbt console in that I get the project's 
> classpath 'for free'.
> 
> 
> Great, just like the REPL. As you mention below though, you still can't 
> interact with the scrapbook as easily as with the REPL. It would be a bit 
> like using a text editor for issuing shell commands at the command line, and 
> having to select those lines to evaluate them one by one. Sure, you can do 
> that, but why on earth would you want to?
>  
> Now, don't get me wrong, the eclipse scrapbook functionality has boatloads 
> that needs to be done. Having to be a wizard at using command line foo to 
> select expressions so I can evaluate them is frankly ridiculously (enter 
> should just eval the expression I just typed, or at least give me a shortcut 
> key to do it, exceptions shouldn't be pasted straight into the scrapbook but 
> shown in the console view, etc, etc, etc), but learning an all new language 
> just because the scrapbook functionality bothers you seems rather drastic. It 
> would be easier to write an entirely new scrapbook plugin for eclipse!
> 
> 
> I would agree that learning a new language just because your current one 
> doesn't have a REPL is nonsense, but that is not related to your original 
> statement that a REPL is useless for anything but beginners. Using eclipse to 
> clean freshly caught fish is equally nonsensical, but that doesn't have 
> anything to do with the original point either.
>  
> I stand by my point that a REPL, as compared to java's advanced debuggers, is 
> a pointless addition except as a teaching tool. I have _NEVER_ met any person 
> that continued arguing in favour of scala / python / some other language with 
> built in REPL that actually knew how to use the eclipse / netbeans / intellij 
> debugger well. Then again I don't think I ever asked specifically on the 
> javaposse groups, so maybe somebody's out there who can tell me what I'm 
> missing.
>  
> 
> So the REPL is still a pointless addition even though it provides a slicker 
> more interactive experience to experimenting with APIs and the language than 
> scrapbooks, and scrapbooks are awesome except when they're not. Got it. Clear 
> as crystal.
> 
> As for never meeting any person who continued to argue in favor of 
> scala/python/some other language with a built in REPL that actually knew how 
> to use the eclipse/netbeans/intellij debugger well? I would say you know me. 
> I am that person and I do still argue in favor of it. Of course I use the 
> debuggers in IDEs as well, I bring every tool I can to bear on a project that 
> will get me to the answer more quickly. The REPL is certainly in that 
> toolbox, as is unit testing, debugging, profiling, static analysis, reading 
> books, being open to other peoples ideas, etc.
> 
> So, now you have met someone that has clearly made that observation. Maybe 
> there are some others on this list who would say the same. Certainly Guido 
> would, he seems very keen on python, and the shell is a big part of Python's 
> value proposition, even though pydev and other tools give you a pretty nice 
> debugger as well. 
> 
> To be even clearer, I use the REPL in addition to all of the other tools you 
> mention here (apart from the scrapbook in eclipse, cos I don't use eclipse, 
> but IDEA as you mention has similar features). I can even start the sbt 
> console in IDEA, and try stuff out right from there, it's still the same REPL 
> I always use, just with more colors. Tell you what, let's call it a scrapbook 
> and we can all agree - it is Christmas after all.
> 
> Dick
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "The Java Posse" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/javaposse/-/PeYU_KRIVSAJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/javaposse?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to