Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] Script shell prints [null] on no result

to expand on that point, In _javascript_ an assignment returns its value, but in Python it does not. So in _javascript_ this is what you get:

a=1
1.0
b=a
1.0

But in Python you get this:

1
1
a=1
[null]

and this latter case is really problematic. Because every statement that is run is followed by the confusing [null] which means nothing to a Python programmer.

Additionally the lack of distinction between null, [null] and undefined in _javascript_ is less than perfect at the moment too.

Compare Chrome:
> undefined
< undefined
> null
< null
> [null]
< [null]
> // comment
< undefined

to EASE:
// use help("<topic>") to get more information
[null]
undefined
[null]
null
[null]
[null]
org.mozilla._javascript_.NativeArray@1d7adb4b
// comment
[null]


My recommendation is to, at a minimum, let the individual language define how "null" is represented in the UI.

Jonah

    


~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

On 18 May 2016 at 07:59, Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:
Interestingly, neither does Python, i.e. in both cases the result is None.

~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

On 18 May 2016 at 07:32, <Christian.Pontesegger@xxxxxxxxxxxx> wrote:
The tricky thing from my point of view is that our script engines for Rhino
and Jython do not provide different return values for 'void' and 'null' on
their execute methods. While I do want to see a null result eg when calling

Object getService(..)

on the output, I do not want to see it on

void print(...)

However our script engines do not show any difference in their execution
result. Not sure how we can handle this so far.

Ideas are welcome
Christian

> -----Original Message-----
> From: ease-dev-bounces@xxxxxxxxxxx [mailto:ease-dev-
> bounces@xxxxxxxxxxx] On Behalf Of Jonah Graham
> Sent: Friday, May 13, 2016 1:24 PM
> To: ease developer discussions
> Subject: [ease-dev] Script shell prints [null] on no result
>
> Christian and I have been having a discussion about the behaviour of the
> shell, specifically when no output (signified by Python None / _javascript_
null)
> is received from the command.
>
> We have been looking at how different tools deal with the output from the
> shell and how to indicate a command is still running.
>
> I invite you to comment, either here on the mailing list, or on the bug:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=493521
>
> Thanks!
> Jonah
>
>
> ~~~
> Jonah Graham
> Kichwa Coders Ltd.
> www.kichwacoders.com
> _______________________________________________
> ease-dev mailing list
> ease-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit https://dev.eclipse.org/mailman/listinfo/ease-dev

_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ease-dev



Back to the top