Novel Thoughts on Scripting and Languages

James Huang judoscript at hotmail.com
Wed Jan 8 00:13:42 EST 2003


> LOL!!!
> 
> I actually succumbed to the
> language-promo-as-novel-thoughts-subterfuge and I had a skim through
> judoscript's whitepaper... thinking all the time 'but did you
> completely forget about jython?!' Then I read this little gem of
> informative logic:
> 
> [quotation omitted]
> 
> and that really was the end of my brief interlude with judoscript. 
> 
> Sandy

So you went to the whitepaper, searched on "jython" in the browser and
finished your research (actually, search)? Doing a language is a huge
undertaking; it would indeed be ludicrous to start one without looking
around first.

I like this community better than the language itself; it is loyal,
active, dedicated, diligent, ... I posted that message in hope of
exchanging some decent ideas. I am glad I did.

Anyway, to answer your concerns over Jython, first of all, assume you
accept that JudoScript is as capable as Jython to script Java. The
following examples demonstrate some of the differences:

-------------------------------------
thread mythrd param1, param2
{
  println 'parameters are: ', param1, ' ', param2;
  println 'Done.';
}
start thread mythrd(1, 'xyz');
-------------------------------------
copy '*.java, *.jj' in '~/src/' except '*Test*, *test*'
     recursive
     into '~/archive/src_' @ date().fmtDate('yyyy-MM-dd') @ '.jar';
-------------------------------------
do 'http://www.yahoo.com' as sgml
{
<a>:   println $_.href;
<img>: println $_.src;
}
-------------------------------------
do 'book.xml' as xml
{
<book>:  println 'Book: ', $_.title;
</book>: println '===============';
}
-------------------------------------
preparedExecuteQury qry:
   select name, email from emp where id=?;
with @1 = '00123';
while qry.next() {
  . 'Name:  ', qry.name; // '.' is synonymous to 'println'
  . 'EMail: ', qry[2];
}
-------------------------------------
exec 'java test.ToLower | java test.Echo'
input {
  . <pipe> 'You should see this message in lower case, not UPPER
CASE!';
  . <pipe> 'Cheers!';
}
-------------------------------------
frame = javanew javax.swing.JFrame("Simplest GUI");
frame.setVisible(true);

guiEvents {
  <frame : Window : windowClosing> :  exit(0);
}
-------------------------------------


These were all in its initial release. It is the vision of these (and
more) plus Java scripting that convinced that this language is worth
doing.

This does not necessarily mean the demise of any other languages. The
way I view it is that, Jython is peace-of-mind for Python programmers
who may want an easy bridge to cross the river to the Java land (if
not already there). This bridge works both ways, so you can come back
to Python land anytime.

Python land has wheat, Java land has rice; both are rich in
carbohydrate. In addition, Java land also grows beans. What do you
want to ship across that bridge? If you one day decide to reside
permanently in Java land, why don't you drive a Cadillac but instead a
Lexus? In any case, JudoScript is a hovercraft.

Cheers,
-James




More information about the Python-list mailing list