Sat Aug 18, 2018 11:55 pm
Login Register Lost Password? Contact Us


Can you add some syntactic sugar?

A place for developers to ask questions about contributing to the open source code base

Sun Jan 20, 2013 3:00 pm Change Time Zone

One of the things that I find annoying at ECL is when I need to use a DATASET of primitives, such as

DATASET(STRING)

It seems to me that it should be easy to make the compiler accept that and easily generate the right code underneath:

like
STRINC_REC = {
STRING _s;
};

and automatically convert DATASET(STRING) to DATASET(STRING_REC)
nvasil
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 105
Joined: Mon Oct 17, 2011 6:48 pm

Mon Jan 21, 2013 8:58 pm Change Time Zone

One of the things that I find annoying at ECL is when I need to use a DATASET of primitives, such as
Can you post a larger piece of example code so we can see exactly what you're doing within its context?

Thanks,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1370
Joined: Wed Oct 26, 2011 7:40 pm

Mon Jan 21, 2013 9:04 pm Change Time Zone

Nothing special.Quite often you just need an array of strings or integers and you always have to wrap them in DATASETS
I would have liked to have DATASET(STRING) or DATASET(INTEGER)
nvasil
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 105
Joined: Mon Oct 17, 2011 6:48 pm

Mon Jan 21, 2013 11:22 pm Change Time Zone

Nothing special.
If it were common practice, then I would probably have the same complaint, but I don't, so...
Quite often you just need an array of strings or integers and you always have to wrap them in DATASETS
I have not found this to be the case. When I need an array (a set, in ECL terms) I simply define a set of strings or integers or whatever.
I would have liked to have DATASET(STRING) or DATASET(INTEGER)
I have no idea what it is you're trying to accomplish, which is precisely why I asked for a code example showing exactly what you are doing.

IOW, right now I have no idea what syntax requirements you are complaining about. If you will please expand on your issue and show me what you are referring to, then communication will have been achieved. :)

Please show me the kind of code you are writing, then perhaps I can show you an alternative.

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1370
Joined: Wed Oct 26, 2011 7:40 pm


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest

cron