All the Scala books and tutorials recommend using the Scala
interactive shell to set up scenarios and learn how Scala works.

I agree, but my problem was the (apparent) lack of something like
Python's >>>dir(object) call, which gives you all the 'names'
available; Ruby and Erlang have similar commands, but not, as far as I
know, Scala.

I did find a little script that does just that at:

http://lousycoder.com/blog/index.php?/archives/91-Scala-Querying-an-objects-fields-and-methods-with-reflection.html

with the source at:

http://gist.github.com/87519

I compiled it, and when I import it, it works just dandy:

scala> import ScalaReflection._
import ScalaReflection._

scala> 3.methods__
hashCode
reverseBytes(int)
compareTo(Object)
compareTo(Integer)
equals(Object)
toString(int,int)
toString(int)
...

scala> 3.fields__
MIN_VALUE
MAX_VALUE
TYPE
digits
DigitTens
DigitOnes
sizeTable
value
SIZE
serialVersionUID

Perhaps there is something like this already built-in to Scala, but I
can't find it... if not, it may be worthwhile adding.

Now, what I want to know is: is there a way to load an actual Lift
session into the interactive command interpreter, so I can create and
check out out functions, etc? I remember doing that with Ruby and
Rails back in the day.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to