[ 
https://issues.apache.org/jira/browse/JEXL-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17531040#comment-17531040
 ] 

Hussachai Puripunpinyo commented on JEXL-367:
---------------------------------------------

I know you are not asking me but since I like JEXL approach for the most part. 
So I'd like to voice my opinion a little bit here.
Java is a statically typed language. JEXL is not built for a big sophisticate 
code. It's for a quick and probably dirty script that can get the job done. 
Statically type for this kind of job is overkill. Also, it's quite complex to 
built a statically typed language.

Groovy has a very small user base. Many people don't even know that this 
language exists. The only thing that keeps it alive is gradle. I'm sure Kotlin 
will take over that space soon. and Grails is .. what is that?

Python is not JVM. (I know there was Jython/JPython and it's long gone). Python 
is a dynamically typed language and it's very good for scripting too. 
Everything looks good exception indentations that can throw many people off. 
Also, It'll be very hard to embed python code in Java when multiline string is 
not supported (I know it's now possible with Java 15).

I don't think there is anything so special about JS. It's just popular and a 
lot of people know it. I believe my PM can write a basic JS code. The 
documentation/books/tutorial are everywhere. Anyone can try it out quickly 
without installing anything. 
It's just about familiarity. I advertise my JEXL fork as a subset of JavaScript 
on steroid. We support a lot of JS functions and most of the time, JEXL code 
written by our users can be run in the web browser too. If JEXL is not resemble 
to JS, I'd have a question too. Why not JS?

> Deprecate -> and support =>
> ---------------------------
>
>                 Key: JEXL-367
>                 URL: https://issues.apache.org/jira/browse/JEXL-367
>             Project: Commons JEXL
>          Issue Type: Wish
>    Affects Versions: 3.2.1
>            Reporter: Hussachai Puripunpinyo
>            Assignee: Henri Biestro
>            Priority: Major
>
> The JEXL code surprisingly looks a lot like Javascript. I think this change 
> is a good transition for folks to update the code, and it's pretty fine if 
> they can tolerate using the deprecate syntax and don't mind seeing a warning 
> log pop up every time. 
> I'd like to propose supporting => and deprecate ->.
> The reasons are
>  - JavaScript becomes very popular and many people are familiar with it.
>  - JEXL is more like for a quick short script. In many scenarios, the target 
> audiences are not a programer. They often mistake a language as a JavaScript 
> (from my experience).
>  - JEXL syntax already looks a lot like JavaScript
>  -- var for variable declaration (Java added in Java 10, but JavaScript 
> supports this from the beginning)
>  -- The function keyword
>  -- Implicit type coercion
>  -- Ternary operator
> The proposed change.
>  * Support => in addition to ->
>  * Deprecate -> and show a warning log when it's used.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to