allow construct for ordered structs

Description

this was discussed at length in the old forum.

Option 1

IMO the best solution is to have only structs that have initial data ordered by default, and empty structs will be regular by default, so:

Option 2

use the notation

to denote an ordered struct – a combination of the standard struct notation with the ordered array notation.

Activity

Show:

Mark Drew 26 May 2016 at 16:04

And the constructor is
myNewStruct = [:];

Michael Offner 26 May 2016 at 16:00

just to be clear, syntax is:

[a:1,b:2];

Michael Offner 26 May 2016 at 11:23

Igal Sapir 16 September 2015 at 21:50

I like the idea of having a `Set` type. currently I defer to a Struct with the values being `true` when I need one.

as for the syntax proposed in this ticket, see http://lang.lucee.org/t/syntax-for-ordered-structs/213

Fixed

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Fix versions

Priority

Created 8 February 2015 at 18:12
Updated 18 June 2023 at 16:52
Resolved 26 May 2016 at 16:00