Initial and partial high-level REPL API review

Brian Goetz brian.goetz at oracle.com
Tue Jun 30 17:00:44 UTC 2015


> When i looked at the JavaDoc i could see many "Key" thingies. I had no idea what they could be at first glance, as it's such a generic name. When dug just a little deeper it became clear they are references to snippets of code. Why not call it CodeSnippet?
>
>    CodeSnippet

Heh, full circle.  This was originally called Snippet, but the Snippet 
abstraction at the time was a big sprawling monster (and took a lot to 
understand, so calling it Snippet wasn't so helpful either).  The Key 
abstraction was intended to indicate that this is just the immutable 
access point for a code snippet, where most of the state lives behind 
the Repl API.  But, Key is indeed very generic; SnippetKey seems a fair 
compromise as it is more specific and captures it's "remote handle" 
nature.



More information about the kulla-dev mailing list