I wrote a small library that uses implicits to add functionality that is only needed when using REPL in Scala. Ruby has such libraries - for such things as beautiful printing, launching text editors (for example, the interactive_editor stone, which calls Vim from irb - see this post ), debuggers, etc. The library I'm trying to write adds some methods to the java.lang.Class and java.lang.reflect classes using the implicit conversion process "pimp my library" to help you find the documentation (first using Google, and then maybe using the JavaDoc / ScalaDoc viewer and possibly the StackOverflow API!). This is a scratch library: I spend so much time copying and pasting cool names on Google that I decided that I could automate the process.
This is the type of functionality that developers will want to add to their system for use only in REPL - they should not really add it to projects (partly because it may not be what their developers want, but also because if you spend some research development, it can only be with the Scala REPL, which is not called by the IDE or assembly tool).
In my case, I want to include several classes and install some implications - include .jar in CLASSPATH and import it mainly.
In Ruby, this is what you would add to your .irbrc file. Other REPLs have similar methods for setting parameters and importing libraries.
Is there a similar file or a way to do this for Scala REPL?
scala shell configuration configuration-files
Tom morris
source share