Cleaner property syntax

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Cleaner property syntax

Re: Cleaner property syntax

by ZippeyKeys12 » Fri Jul 20, 2018 12:25 am

argv wrote:Like this?

Code: Select all

property SomeProperty: int SomeField1, bool SomeField2;
Yeah, exactly

Re: Cleaner property syntax

by argv » Thu Jul 12, 2018 6:05 pm

Like this?

Code: Select all

property SomeProperty: int SomeField1, bool SomeField2;

Re: Cleaner property syntax

by ZippeyKeys12 » Thu Jul 12, 2018 2:33 pm

This will only work for single-variable, same-name properties.
It would be nice if there was a better way, that also applied to more cases.

Cleaner property syntax

by argv » Sat Jul 07, 2018 9:27 pm

The current syntax for declaring a property mapped to a single field (a very common pattern) is rather verbose:

Code: Select all

int SomeProperty;
property SomeProperty: SomeProperty;
This could be shortened:

Code: Select all

property int SomeProperty;

Top