jsr341-experts@el-spec.java.net

[jsr341-experts] Re: concat and assign operators

From: Ramesh <rameshp_at_pramati.com>
Date: Tue, 30 Aug 2011 18:18:20 +0530

'&' looks good. Apart from this i have '~' in mind.

On 8/28/2011 5:03 AM, Mark Thomas wrote:
> On 27/08/2011 16:10, Pete Muir wrote:
>> On 27 Aug 2011, at 00:51, Kin-man Chung wrote:
>>
>>> On 08/26/11 16:24, Mark Thomas wrote:
>>>> On 26/08/2011 23:53, Kin-man Chung wrote:
>>>>
>>>>> I've written something for the concatenation and assignment operators in
>>>>> the wiki
>>>>>
>>>>> http://java.net/projects/el-spec/pages/Operators.
>>>>>
>>>>> These two are important operators that were somehow omitted in the
>>>>> current EL. I'd like to include them in this JSR, since they are
>>>>> obviously needed, especially in a stand-alone environment.
>>>>>
>>>>> It is hard to imagine an expression language without a concatenation
>>>>> operator. The current EL gets by with composite expressions. But
>>>>> composite expressions are restricted to the root level expressions (for
>>>>> instance, it cannot be used as method arguments). Moreover, with
>>>>> automatic bracketing of expressions, concatenation operator is a must.
>>>>>
>>>>> I've pick # as the concatenation operator. I wish I can use +, but I
>>>>> can't, because it is an arithmetic add, even for string operands.
>>>>>
>>>> That is a pain. Is # used as the concatenation operator in any other
>>>> languages? Might there be an operator that we could reuse that looks
>>>> more natural? Possibilities that come to mind:
>>>> +=
>>>> || (already used in EL - can't use it)
>>>> &
>>>>
>>>>
>>> I like&. How about
>>> ++
>>> !
>> & is good. Reminds me of my ASP days ;-)
> Of the suggestions so far I like
> &
> +=
>
> Looks like& is the consensus preference.
>
> Mark
>