Title: Remove FFI type aliases while it's still experimental · Issue #64848 · nodejs/node · GitHub
Open Graph Title: Remove FFI type aliases while it's still experimental · Issue #64848 · nodejs/node
X Title: Remove FFI type aliases while it's still experimental · Issue #64848 · nodejs/node
Description: What is the problem this feature will solve? node:ffi was introduced with synonyms for the same types i8, int8 u8, uint8, bool, char i16, int16 u16, uint16 i32, int32 u32, uint32 i64, int64 u64, uint64 f32, float f64, double pointer, ptr...
Open Graph Description: What is the problem this feature will solve? node:ffi was introduced with synonyms for the same types i8, int8 u8, uint8, bool, char i16, int16 u16, uint16 i32, int32 u32, uint32 i64, int64 u64, ui...
X Description: What is the problem this feature will solve? node:ffi was introduced with synonyms for the same types i8, int8 u8, uint8, bool, char i16, int16 u16, uint16 i32, int32 u32, uint32 i64, int64 u64, ui...
Opengraph URL: https://github.com/nodejs/node/issues/64848
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove FFI type aliases while it's still experimental","articleBody":"### What is the problem this feature will solve?\n\nnode:ffi was introduced with synonyms for the same types \n```\ni8, int8\nu8, uint8, bool, char\ni16, int16\nu16, uint16\ni32, int32\nu32, uint32\ni64, int64\nu64, uint64\nf32, float\nf64, double\npointer, ptr\nstring, str\nbuffer\narraybuffer\n```\n\nWhile this may be convenient for folks that are familiar with the different names, it also adds mental overhead - developers need to confirm if 'char' and 'u8' mean the same thing or are subtly different. \n\nThere were a few bugs that are kindof related to this\n - when `ffi.types.FLOAT_32` was added it's value was `float32` which wasn't a supported alias, so now there's three ways to spell float 32.\n- `buffer` and `arraybuffer` are also synonyms but are different lines in the docs\n- `char` is listed on the same lines as u8 and bool but it is not a synonym (it varies by platform)\n\ncc @nodejs/ffi\n\n### What is the feature you are proposing to solve the problem?\n\nWe should remove each synonym and keep one spelling for each distinct type.\nI'm not opinionated on which spelling we prefer, I think the uint8 style agrees with `ffi.types` and the access helpers (getUint8).\n\nWe should do this now while the module is experimental. WE can always add more names in the future, but removing them after the module is stable is harder.\n\n### What alternatives have you considered?\n\n* we could do nothing and live with the synonyms\n* we could deprecate and print a warning when the non-preferred aliases are used","author":{"url":"https://github.com/everett1992","@type":"Person","name":"everett1992"},"datePublished":"2026-07-30T17:20:53Z","url":"https://github.com/nodejs/node/issues/64848"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:64f2a089-de8c-0383-be27-6c5738c1e0ac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9092:3BA6B9:809061:AB4DEE:6AED27F5 |
| html-safe-nonce | f1de3c92e7047e026300f1d387cfdbae40dbc1996bb69e95cd6140a949c4437c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDkyOjNCQTZCOTo4MDkwNjE6QUI0REVFOjZBRUQyN0Y1IiwidmlzaXRvcl9pZCI6IjI4NjI3NzgxNTA0OTM2OTM5NDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6b77cc344edb1ae3163e5279cf4145e1dadaa984ff18a7893ee1bf548c5954eb |
| hovercard-subject-tag | issue:5022305379 |
| 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/nodejs/node/64848/issue_layout |
| twitter:image | https://opengraph.githubassets.com/def342f703ad06f3491f1d52f267f3673242b185fa2a38051fcc3adc2a8274c8/nodejs/node/issues/64848 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/def342f703ad06f3491f1d52f267f3673242b185fa2a38051fcc3adc2a8274c8/nodejs/node/issues/64848 |
| og:image:alt | What is the problem this feature will solve? node:ffi was introduced with synonyms for the same types i8, int8 u8, uint8, bool, char i16, int16 u16, uint16 i32, int32 u32, uint32 i64, int64 u64, ui... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | everett1992 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d95365dda0576efe9b71f45807595e396bd0ca9286fba5367a05048e6ddf8f2 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| 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 | 98b41fa4b5635ceb45a4c54320fced73817ff290 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width