Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » B3 » issues with property terminal
issues with property terminal [message #538169] Sat, 05 June 2010 20:55 Go to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2499
Registered: July 2009
Senior Member
Hi,
Another change that I am contemplating is the syntax for properties,
currently it is $QID e.g. $this.is.a.property, this is a problem since
properties can be used in expressions, and one of things you may want to
do is to invoke a member function on a string property.

As an example $this.is.a.property.size() results in a call on the value
of the property "this.is.a.property.size", whereas the code
$this.is.a.property .size() performs the call.

I can think of several ways to handle this - the simplest is to change
the terminal so there is an ending delimiter.

Either:
$this.is.a.property$

or

${this.is.a.property}

I like the later, as it is more clear that the ${ } is syntax to
reference the property, and it is a commonly used construct.

- henrik
Re: issues with property terminal [message #538210 is a reply to message #538169] Sun, 06 June 2010 09:06 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3229
Registered: July 2009
Senior Member
On 2010-06-06 02:55, Henrik Lindberg wrote:
> Either:
> $this.is.a.property$
>
> or
>
> ${this.is.a.property}
>
> I like the later, as it is more clear that the ${ } is syntax to
> reference the property, and it is a commonly used construct.
>
I agree. Let's use the latter. I belive that in a unix shell, you can
use both $foo and ${foo}. The former can be used when there is no
ambiguity such as the need to distinguish:

${foo}bar

from

$foobar

I'm not much in favor of that though. It's better to have one canonical
way to express property expansion.

- thomas
Re: issues with property terminal [message #538233 is a reply to message #538210] Sun, 06 June 2010 19:19 Go to previous message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2499
Registered: July 2009
Senior Member
Fixed in Head.
- henrik

On 6/6/10 3:06 PM, Thomas Hallgren wrote:
> On 2010-06-06 02:55, Henrik Lindberg wrote:
>> Either:
>> $this.is.a.property$
>>
>> or
>>
>> ${this.is.a.property}
>>
>> I like the later, as it is more clear that the ${ } is syntax to
>> reference the property, and it is a commonly used construct.
>>
> I agree. Let's use the latter. I belive that in a unix shell, you can
> use both $foo and ${foo}. The former can be used when there is no
> ambiguity such as the need to distinguish:
>
> ${foo}bar
>
> from
>
> $foobar
>
> I'm not much in favor of that though. It's better to have one canonical
> way to express property expansion.
>
> - thomas
Re: issues with property terminal [message #608332 is a reply to message #538169] Sun, 06 June 2010 09:06 Go to previous message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3229
Registered: July 2009
Senior Member
On 2010-06-06 02:55, Henrik Lindberg wrote:
> Either:
> $this.is.a.property$
>
> or
>
> ${this.is.a.property}
>
> I like the later, as it is more clear that the ${ } is syntax to
> reference the property, and it is a commonly used construct.
>
I agree. Let's use the latter. I belive that in a unix shell, you can
use both $foo and ${foo}. The former can be used when there is no
ambiguity such as the need to distinguish:

${foo}bar

from

$foobar

I'm not much in favor of that though. It's better to have one canonical
way to express property expansion.

- thomas
Re: issues with property terminal [message #608334 is a reply to message #538210] Sun, 06 June 2010 19:19 Go to previous message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2499
Registered: July 2009
Senior Member
Fixed in Head.
- henrik

On 6/6/10 3:06 PM, Thomas Hallgren wrote:
> On 2010-06-06 02:55, Henrik Lindberg wrote:
>> Either:
>> $this.is.a.property$
>>
>> or
>>
>> ${this.is.a.property}
>>
>> I like the later, as it is more clear that the ${ } is syntax to
>> reference the property, and it is a commonly used construct.
>>
> I agree. Let's use the latter. I belive that in a unix shell, you can
> use both $foo and ${foo}. The former can be used when there is no
> ambiguity such as the need to distinguish:
>
> ${foo}bar
>
> from
>
> $foobar
>
> I'm not much in favor of that though. It's better to have one canonical
> way to express property expansion.
>
> - thomas
Previous Topic:question/issue : changing ~= operator to ?=
Next Topic:b3 status
Goto Forum:
  


Current Time: Fri Aug 29 22:36:23 EDT 2014

Powered by FUDForum. Page generated in 0.01854 seconds