« Return to Thread: Mission Objective of scalax

Mission Objective of scalax

by Jesse Eichar-2 :: Rate this Message:

Reply to Author | View in Thread

Hi,

I have been thinking about the MO of scalax.  In my life it has been (to a large degree) a library for helping write scripts and generally overcome many of the common annoyances of Java.  Copying files and deleting diretories are the classic examples.  

As such I had a couple of ideas that I would like to see included in the library.  I am not asking anyone to write these.  I will do that when time permits.  I am just asking if there is interest.

So:

1.  A mechanism for executing processes.  The current one is quite hard to use and could be made much more functional in design. For example a function could be passed in for dealing with the Error stream
2.  A way to essentially do dynamic invocation.  As an example lets say we have an implicit conversion to a DynamicObject that has a --> operator (or maybe ~> ) or maybe we should skip the fancy sugar and just use invoke. So here is a small example

import scalax.reflect.DynamicObject._
val someObject = getSomeObject();
someObject ~> ("operate") (1,2,3)

this would run the operate method on someObject.


I think the simplified reflection would be handy because sometimes in scripting you just want to call a method and to heck with casting, type introspection and whatever else.  And everyone knows how difficult Java reflection is to use.

Comments? Ideas? Suggestions?

Jesse

 « Return to Thread: Mission Objective of scalax