tracker issue : CF-4126522

select a category, or use search below
(searches all categories and all time range)
Title:

We don't need both ordered and sorted structs

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 03/09/2016

Components: Language

Versions: 2016

Failure Type: Unspecified

Found In Build/Fixed In Build: Alpha3_v12 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 1

Listed in the version 2016.0.03.300466 Issues Fixed doc
I'm left to wonder is is there any real point in having both ordered and sorted structs? ordering and sorting in this context is pretty much the same thing, and really insertion-order, alphabetical-order-ascending and alphabetical-order descending are all just ways of ordering things. So why do we need two variations? All we need is three method signatures:

orderedByInsertion = structNew("ordered");
orderedByAlpha = structNew("ordered", "asc"); // or "desc"
orderedByComparator = structNew("ordered, function);


We don't need two separate implementations here. I reckon they should get rid of one.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4126522

External Customer Info:
External Company: Straker Interactive
External Customer Name: Adam Cameron
External Customer Email: CAMERON.ADAM@GMAIL.COM
External Test Config:

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Severity newValue: 2 oldValue: 3 oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-16 04:58:39.0 action: updated fieldName: Priority newValue: 2 oldValue: 0 oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-16 04:58:11.0 action: updated fieldName: Status newValue: ToFix oldValue: Deferred oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-15 06:24:09.0 action: updated fieldName: Date Deferred newValue: null oldValue: 22-DEC-15 03.30.12.000000000 AM oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-15 06:24:09.0 action: updated fieldName: Date Closed newValue: null oldValue: 22-DEC-15 03.30.12.000000000 AM oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-15 06:24:09.0 action: updated fieldName: Closed By newValue: Blank oldValue: suchsing oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-15 06:24:09.0 action: updated fieldName: Owner newValue: mchandna oldValue: Blank oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-15 06:24:09.0 action: updated fieldName: Reason newValue: Blank oldValue: Blank oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-15 06:24:09.0 action: updated fieldName: State newValue: Open oldValue: Closed oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-15 06:24:09.0 action: updated fieldName: Date Closed newValue: 2015-12-22 03:30:12.0 oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: Fix By Product Milestone newValue: Alpha oldValue: Gold Master oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: Date Deferred newValue: 2015-12-22 03:30:12.0 oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: Fix By Milestone newValue: Alpha oldValue: Gold Master oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: Reason newValue: Blank oldValue: AsDesigned oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: State newValue: Closed oldValue: Open oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: Status newValue: Deferred oldValue: ToTest oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: Owner newValue: Blank oldValue: suchsing oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: Closed By newValue: suchsing oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-22 11:30:12.0 action: updated fieldName: Owner newValue: suchsing oldValue: mchandna oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-12-22 11:05:10.0 action: updated fieldName: Status newValue: ToTest oldValue: ToFix oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-12-22 11:05:10.0 action: updated fieldName: Reason newValue: AsDesigned oldValue: BugVerified oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-12-22 11:05:10.0 action: updated fieldName: Fix By Milestone newValue: Gold Master oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-02 09:29:07.0 action: updated fieldName: Fix By Product Milestone newValue: Gold Master oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-02 09:29:07.0 action: added fieldName: Vote Type newValue: BETA oldValue: Blank oprid: prerelease recordName: AD_DEFECT_VOTE timpestamp: 2015-12-01 11:20:15.0 action: updated fieldName: Status newValue: ToFix oldValue: Unverified oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-01 06:16:38.0 action: updated fieldName: Owner newValue: mchandna oldValue: suchsing oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-01 06:16:38.0 action: updated fieldName: Reason newValue: BugVerified oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-12-01 06:16:38.0 action: updated fieldName: Owner newValue: suchsing oldValue: inoel oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-11-30 07:28:39.0 action: updated fieldName: Dev Assigned newValue: mchandna oldValue: awdhesh oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-11-30 07:28:39.0 action: updated fieldName: QE Assigned newValue: suchsing oldValue: inoel oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-11-30 07:28:39.0
Comment by CFwatson U.
3871 | March 09, 2016 02:27:21 AM GMT
+1 - excellent idea! - no need for both
Vote by External U.
3874 | March 09, 2016 02:27:23 AM GMT
Added By: PreRelease User User Name:Aaron Neff Note Added: Reminder: It should be StructNew('Ordered') Most CF developers will be confused by the word "Linked" b/c they do not know about Java's LinkedHashMap. They will think "linked to what?" And "what is my struct linked to?" Sorted structs can then be: StructNew("Ordered", "asc|desc") StructNew("Ordered", "asc|desc", "numeric,text,textnocase") StructNew("Ordered", comparator) Thus, ordered structs either have insertion order or sorted order. They're all "ordered". Thanks!, -Aaron Date Added :2016-01-09 00:39:52.0 Added By: PreRelease User User Name:Adam Cameron Note Added: Entered Bug. Date Added :2015-11-28 13:50:32.0
Comment by CFwatson U.
3872 | March 09, 2016 02:27:24 AM GMT
This has already been fixed considering all the options discussed on forums. Please refer to the latest docs for sorted and ordered structs.
Comment by Milan C.
3873 | September 19, 2016 12:52:03 AM GMT