-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Remove get_*
on getters as per RFC 0344
#6224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 Within the DOM we do this already, but somehow all unsafe layouty methods and bindings still have this. Avoid touching Servo and Rust don't really follow the style for Rust-y code in their internals (partially because they've been around for very long and fixing style to fix the fluid "prevailing" style is very low priority), but that doesn't mean we shouldn't try. |
Actually, come to think of it I prefer having |
Just to be absolutely clear, do you believe that none of the APIs should change or should I just avoid the unsafe ones (in addition to the |
Just avoid the unsafe ones and the script ones (unless pcwalton or someone else who uses them regularly is okay with it). Most of the unsafe ones are in script anyway. |
Part of servo#6224 I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
Part of servo#6224 I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
Part of #6224 I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script` <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6230) <!-- Reviewable:end -->
Never mind. |
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server Hi guys, I just gave a big pass of RFC-0344 as per issue #6224 . Pretty much renamed all the get_* fn that were used to fetch values. I hope I didn't rename too much. As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit. I've ran the whole pass of test, everything seems to be still working right :). Please give feedback on this PR. Thanks for looking into it. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559) <!-- Reviewable:end -->
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server Hi guys, I just gave a big pass of RFC-0344 as per issue #6224 . Pretty much renamed all the get_* fn that were used to fetch values. I hope I didn't rename too much. As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit. I've ran the whole pass of test, everything seems to be still working right :). Please give feedback on this PR. Thanks for looking into it. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559) <!-- Reviewable:end -->
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server Hi guys, I just gave a big pass of RFC-0344 as per issue #6224 . Pretty much renamed all the get_* fn that were used to fetch values. I hope I didn't rename too much. As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit. I've ran the whole pass of test, everything seems to be still working right :). Please give feedback on this PR. Thanks for looking into it. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559) <!-- Reviewable:end -->
I'm pretty satisfied with the work that's been done towards this. There might be a few remaining but it's probably not worth it to keep this open |
Remove `get_*` on getters as per RFC 0344. https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis #6224 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10327) <!-- Reviewable:end -->
… frewsxcv:get-prefix); r=ms2ger https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis servo/servo#6224 Source-Repo: https://github.com/servo/servo Source-Revision: 0760e56bb66e38a16543ed24385c29fd7c4a034b UltraBlame original commit: 577d50ba257e1d66e92a68f4c80e20cd563e5363
… frewsxcv:get-prefix); r=ms2ger https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis servo/servo#6224 Source-Repo: https://github.com/servo/servo Source-Revision: 0760e56bb66e38a16543ed24385c29fd7c4a034b UltraBlame original commit: 577d50ba257e1d66e92a68f4c80e20cd563e5363
… frewsxcv:get-prefix); r=ms2ger https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis servo/servo#6224 Source-Repo: https://github.com/servo/servo Source-Revision: 0760e56bb66e38a16543ed24385c29fd7c4a034b UltraBlame original commit: 577d50ba257e1d66e92a68f4c80e20cd563e5363
… frewsxcv:get-prefix); r=ms2ger https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis servo/servo#6224 Source-Repo: https://github.com/servo/servo Source-Revision: 0760e56bb66e38a16543ed24385c29fd7c4a034b
In an effort to:
I propose we remove the
get_
prefix on most getters in the codebase.If the glorious leaders of Servo approve this, I (@frewsxcv) would be willing to take on this momentous feat.
RFC
-- RFC 0344 § Getter/setter APIs
The text was updated successfully, but these errors were encountered: