Title: Confusing property/get/set API · Issue #63 · stacktracejs/stackframe · GitHub
Open Graph Title: Confusing property/get/set API · Issue #63 · stacktracejs/stackframe
X Title: Confusing property/get/set API · Issue #63 · stacktracejs/stackframe
Description: Expected Behavior For the StackFrame object, I would expect a very simple way to get and set properties: Just access stackframe.filename to read the property Set the property via stackframe.filename = "myfile.js" That should be the API r...
Open Graph Description: Expected Behavior For the StackFrame object, I would expect a very simple way to get and set properties: Just access stackframe.filename to read the property Set the property via stackframe.filenam...
X Description: Expected Behavior For the StackFrame object, I would expect a very simple way to get and set properties: Just access stackframe.filename to read the property Set the property via stackframe.filenam...
Opengraph URL: https://github.com/stacktracejs/stackframe/issues/63
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Confusing property/get/set API","articleBody":"\u003c!--- Provide a general summary of the issue in the title above --\u003e\r\n\r\n## Expected Behavior\r\n\u003c!--- If you're describing a bug, tell us what should happen --\u003e\r\n\u003c!--- If you're suggesting a change/improvement, tell us how it should work --\u003e\r\nFor the StackFrame object, I would expect a very simple way to get and set properties:\r\n\r\n- Just access `stackframe.filename` to read the property\r\n- Set the property via `stackframe.filename = \"myfile.js\"`\r\n\r\nThat should be the API regardless of whether or not it is implemented as a getter/setter pair. If there is extra work to do for either, then a getter/setter pair should be used with a hidden property like `stackframe._filename`, which the user should not be instructed to access directly.\r\n\r\n\r\n## Current Behavior\r\n\u003c!--- If describing a bug, tell us what happens instead of the expected behavior --\u003e\r\n\u003c!--- If suggesting a change/improvement, explain the difference from current behavior --\u003e\r\nThe current API is confusing and does not make use of actual JS getters and setters. For example:\r\n\r\n- What happens if I set the property directly? Is that the same as the set method?\r\n- What's different about accessing the property vs. the get method? Both are used in the documentation with no explanation.\r\n\r\n\r\nFurthermore, the typings for the set methods have zero parameters defined.","author":{"url":"https://github.com/steverep","@type":"Person","name":"steverep"},"datePublished":"2023-08-16T19:46:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/63/stackframe/issues/63"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:640f9a19-9530-5e10-d1f4-9f56f99b2bad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3BE:4969C:1F48AF7:29C131A:69705464 |
| html-safe-nonce | 02c71c2efbc10a821684edb722494aed755181b3db2d40af7b34480ddfba329c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0JFOjQ5NjlDOjFGNDhBRjc6MjlDMTMxQTo2OTcwNTQ2NCIsInZpc2l0b3JfaWQiOiI0MTYyMDgwNTk2MDU0NzIzNTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 960cf2fdf3d7cb9e8ab537fe1d19e3c77d23d5e1ca23ae6889445c99a7c29451 |
| hovercard-subject-tag | issue:1853813573 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stacktracejs/stackframe/63/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a43cf818a374e7dc6f193f2aaecf9b4bf64f1fb0e84a2c56f0a045ba70bc5e58/stacktracejs/stackframe/issues/63 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a43cf818a374e7dc6f193f2aaecf9b4bf64f1fb0e84a2c56f0a045ba70bc5e58/stacktracejs/stackframe/issues/63 |
| og:image:alt | Expected Behavior For the StackFrame object, I would expect a very simple way to get and set properties: Just access stackframe.filename to read the property Set the property via stackframe.filenam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | steverep |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/stacktracejs/stackframe git https://github.com/stacktracejs/stackframe.git |
| octolytics-dimension-user_id | 6131251 |
| octolytics-dimension-user_login | stacktracejs |
| octolytics-dimension-repository_id | 23548039 |
| octolytics-dimension-repository_nwo | stacktracejs/stackframe |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 23548039 |
| octolytics-dimension-repository_network_root_nwo | stacktracejs/stackframe |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f643964067a552f02067066d6a910b2f90a5721f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width