Skip to main content

[jsr363-experts] EP 222 aka JShell

  • From: Werner Keil < >
  • To: " " < >
  • Subject: [jsr363-experts] EP 222 aka JShell
  • Date: Wed, 1 Jul 2015 15:47:02 +0200

Hi,

Though it is still a bit fuzzy, it seems JEP 222 also known as JShell could
be ready with JDK 9.
http://openjdk.java.net/jeps/222

Looking at examples for existing BeanShell
http://www.beanshell.org/manual/quickstart.html

It would be tempting to do something along the lines of

twoCm = (1cm)*2;

Backed by JSR 363.

Existing Groovy/Grails support for JSR 275 documented by Guillaume some
while ago
http://groovy.dzone.com/news/domain-specific-language-unit-

shows, the syntax for a DSL or scripting language for unit support and
conversion feels pretty much the same way it could do under JShell.

Of course, there is such a shell (actually written in Java) with strong
unit support already, Frink:
http://futureboy.us/frinkdocs/
http://futureboy.us/frinkdata/units.txt
Note, it defines

m^-3 kg ||| mass_density

also using the term Mass Density here;-)

Despite the fact, it may take a lot of effort to mimic Frink's full power
under JShell, both a custom unit system backed by Frink (could be done
under https://github.com/unitsofmeasurement/uom-systems) and Frink like
evaluations on top of JShell could be an interesting JDK extension project
for the SE8/9 afficionados among us.

WDYT?

Werner


[jsr363-experts] EP 222 aka JShell

Werner Keil 07/01/2015
 
 
Close
loading
Please Confirm
Close