JEP 222: Java Read-Eval-Print Loop (REPL)
Remi Forax
forax at univ-mlv.fr
Sun Nov 2 01:08:55 UTC 2014
On 11/02/2014 12:34 AM, Robert Field wrote:
> Thanks Remi.
>
> Does automatic creation of a temp variable for an expression address 2
> without breaking 1?
I end up doing something like this, all variables created in the REPL
are stored in a Map
and I re-create all of them as local variables before execution the
expression and
after executing the expression, I save the ones that have been
created/modified back into the map.
I need to do that instead of transforming the access to a REPL variable
to a map.get()/map.put()
because of the semantics of the captured local variables in lambdas/blocks.
About 2 without breaking 1, the main issue is in function (let say that
they are translated into Java static method),
if you do not allow to not declare type, then it doesn't work like at
the top level of the REPL and if you do
then it doesn't work like in a classical Java file.
>
> Bash et al, was that compatibility or features, if features, what
> features?
Features and compatibility, the feature asked were syntax highlighting
and programmable completion,
and the compatibility was with the different format to specify syntax
highlighting, programmable completion,
and also corner cases in the way to use glob when searching history, do
text substitution, etc.
>
> What were your answers to these?
standard answers, hire another guy to do the customization or
in case of the open source project, i accept pull requests !
not something i'm very proud of but i had/have to stay focused.
>
> Thanks,
> Robert
cheers,
Rémi
>
>
>
> On November 1, 2014 2:46:03 PM Remi Forax <forax at univ-mlv.fr> wrote:
>
>>
>> On 11/01/2014 05:14 PM, Brian Goetz wrote:
>> > What might be useful, though, is any *usability* experience that you
>> > had with people trying it out. What did people complain about? What
>> > non-obvious features did people seem to expect should be part of the
>> > feature set?
>>
>> I build 3 REPLs for mostly DSLs that runs on top of the JVM.
>>
>> features: history, code completion, doc, record/replay
>>
>> usual comments:
>> - number 1: it works in the REPL but not with a file.
>> - number 2: can I avoid to declare the types (see number 1).
>> - it doesn't work like bash, zsh, ipython.
>> - can I have the feature XXX of IntelliJ/Eclipse/Netbeans ?
>> - the doc of this method is too big, I want only the interesting part.
>> - record/replay, I want only to replay the part that are not me
>> messing around.
>>
>> >
>> > (Note, though, that we're asking for *actual* experience of "I built X
>> > and people who used it complained of Y", not theorizing of the form "I
>> > could imagine I might want Y in some situation...".)
>>
>> cheers,
>> Rémi
>>
>> >
>> > On 11/1/2014 12:03 PM, Robert Field wrote:
>> >> Thanks Bruce. I'm quite far along, so I doubt that would be useful.
>> >>
>> >> -Robert
>> >>
>> >> On 11/01/14 01:58, Bruce Chapman wrote:
>> >>> I built (for some value of "built" near to the value of "hack")
>> one of
>> >>> these back in 2009 for our local java user group [1] as a demo
>> for the
>> >>> compiler API and an annotation processor test framework I built [2]
>> >>>
>> >>> If you are interested I can find and dust off the code and make sure
>> >>> it still all works (why wouldn't it).
>> >>>
>> >>> Bruce
>> >>>
>> >>>
>> >>>
>> >>> [1] http://wellingtonjug.org.nz/talk200905.html
>> >>> [2] https://java.net/projects/hickory
>> >>>
>> >>>
>> >>> On 31/10/2014 10:56 a.m., mark.reinhold at oracle.com wrote:
>> >>>> New JEP Candidate: http://openjdk.java.net/jeps/222
>> >>>>
>> >>>> - Mark
>> >>>>
>> >>>
>> >>>
>> >>> ---
>> >>> This email is free from viruses and malware because avast! Antivirus
>> >>> protection is active.
>> >>> http://www.avast.com
>> >>>
>> >>
>>
>
>
More information about the compiler-dev
mailing list