On Saturday, December 24, 2011 8:59:31 PM UTC+1, Dick Wall wrote: > > > 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. >
Yes, they are a useless addition to a language provided there's already an advanced debugger, scrapbook tool, etc, available. Java _HAS_ that, therefore trying to sell scala as 'it has a REPL!' is not a good way to sell it, as that has zero upside compared to what java has, _except_ for teaching. That's the one area where I grant that a REPL has actual use. Note that advanced debuggers are _more_ useful than REPLs, which is why I said REPLs are useless. They are worse than the alternative and the alternative can do everything REPLs can do (except, more or less, to serve as a learning environment, an important omission). If I created the impression that REPLs are useless because what they _do_ (let you type expressions and instantly see the results as you go) is useless, then I created the wrong impression. > > 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. > Scrapbooks are the proverbial spoon here vs. repl's spork, if you want to stress this analogy to its breaking point. advanced debuggers do all REPLs do and more (they inherit project classpath by default, work with full colourization, auto-complete, etc, the same way my IDE does things so I don't have to learn two environments, and as I can just add a breakpoint in the middle of a live, running app and then jump into evaluating whatever I want to evaluate, it's just easier to try and figure out what my code is doing compared to trying to fire up a REPL, then loading my app and trying to manually reconstruct breakpoint features). > (more on how eclipse's scrapbook feature has some gaping holes in it). > Yes, how unfortunate. Fortunately for eclipse, fixing those holes is a matter of hours (how hard could it be to add CTRL+ENTER = evaluate everything I wrote since I last asked you to evaluate stuff). Making scala's REPL a full breakpoint-capable debugger is a dozen man years. Unfortunately for us, team eclipse doesn't seem to give a toss. Which is strange, but reflective of Joe Java's opinion. Now why would that be? I just don't know. Why does Joe Java not care about any of this? I'd have a very hard time indeed trying to write large projects in a language that has no usable debugger. > 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 don't want a REPL. I want an advanced debugger. If I can't have the latter I'll take all the scraps (i.e., a REPL) I can get, but I wont be happy about it. That's what I meant with 'REPLs are useless'. I probably should have made more clear that I meant this in the context of java (and 'REPL' in the context of what python and scala provide). 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. > > Yup. Except the part where REPLs are slicker and more interactive. They aren't, with the sole exception of eclipse's particular implementation of the idea having a very curious lack of a convenient key for 'evaluate everything I typed since I last asked you to evaluate things'. Right now it's a 2-key combo shortcut, though fortunately muscle memory picks it up quickly. It's the scrapbook page that is vastly slicker and more interactive. It will fit in seamlessly in my project (picking up classpath, letting me call into it, letting me open the scrapbook page and then start evaluating expressions I wrote down earlier in the context of the current breakpoint, etc). These are hard things to add to scala's REPL doohickey. Conversely, adding 'ctrl+enter means evaluate what I just typed' to eclipse's scrapbook thing is very easy. Right now it's CMD+SHIFT+LEFT followed up by CMD+SHIFT+U on my machine. Hmm, can I make 1 keyboard shortcut that does two things? Something I'll be checking out after I finish writing this post! > 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. > Well, that's one, touché. > 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. > If you abstract the features of a REPL to a sufficiently high level, I'm fairly sure we do end up concluding that what scrapbook is trying to do and what REPL is trying to do is the exact same thing, just different ways to get there. Happy holidays :) -- 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/-/G6m-yAai0NgJ. 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.
