| Summary: | future proofing extension point API | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> |
| Component: | Client | Assignee: | Simon Kaegi <simon_kaegi> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | john.arthorne, mamacdon, simon_kaegi |
| Version: | unspecified | ||
| Target Milestone: | 5.0 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Susan McCourt
Well, adding new arguments in the future isn't a breaking change in JavaScript. But, I agree a property object is an easier to use API in the long run in many cases. (In reply to comment #1) > Well, adding new arguments in the future isn't a breaking change in JavaScript. > But, I agree a property object is an easier to use API in the long run in many > cases. adding new arguments is not breaking, but changing the order is, so a property object is a bit more future proof/flexible. The arrays are the ones I'm particularly leery of. For example I changed replacements: [["match", "replacement"], ["match2", "replacement2"]] to replacements: [{source: "match", replacement: "replacement"}, {source: "match2", replacement: "replacement2"}] This lets us add properties to replacements in the future, such as flags, etc. Without doing this, we'd have to start introducing new top level properties like: replacementsFlags: ["g", "g"] rather than replacements: [{source: "match", replacement: "replacement", flags: "g"}] etc... This is important but not for our guarantees in 1.0. Moving to 2.0 M1 where we should be straightening out more of these API. Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html |