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

Javascript is even more annoying

a = 1
     1.0
var b = 1
    [null]

So the 'var' keyword changes behavior here. I see that in some cases it would make sense to return the 'null' representation of the target language like you described in your post. For that we could avoid transforming the PyNone object to 'null' when we convert it to the java world. Possibly this is an option. However when your script returns something (eg to another script, to a shared storage, etc) you do want to have script language independent artifacts. PyNone would be of no use to anything else than Jython. Even another python interpreter would be lost with that specific object.

Also 'null' could be used as an input value for a Java method - and might make sense in some cases. PyNone would be problematic here.

So I see use cases for both ways of implementation. Personally I am not sure which one is better. Having preferences for that is also not very promising as different installations of EASE might get incompatible to each other.

I do see your point here but cannot think of a clean implementation so far. We have to decide for one way or the other, both have benefits and drawbacks depending on your use case.

Christian


Back to the top