Skip to content

Renamed to AArc#632

Draft
Nelonn wants to merge 2 commits intoaui-framework:developfrom
Nelonn:feat/rename-shared-ptr
Draft

Renamed to AArc#632
Nelonn wants to merge 2 commits intoaui-framework:developfrom
Nelonn:feat/rename-shared-ptr

Conversation

@Nelonn
Copy link
Copy Markdown

@Nelonn Nelonn commented Sep 23, 2025

No description provided.

@Nelonn Nelonn self-assigned this Sep 23, 2025
@Nelonn Nelonn added the design Architecture proposals label Sep 23, 2025
@Alex2772
Copy link
Copy Markdown
Collaborator

Alex2772 commented Sep 23, 2025

Ignore the broken pipeline on windows.

This PR is sufficient for start testing the rename proposal of _ to AArc. The question is: who and when would refactor the entire framework from _ to AArc?

@luadebug @AliaskaRuS what do you guys think about renaming _ to AArc? Suggested name candidates are:

  • AArc
  • Arc
  • ASharedPtr
  • namespaced stuff life aui::shared_ptr

Arc is extremely comfortable to folks familiar with rust. In C++ world, the same concept is called shared_ptr. However, I like the rust naming more, because it's shorter.

Comment thread aui.core/src/AUI/Common/SharedPtrTypes.h
Comment thread aui.core/src/AUI/Common/SharedPtrTypes.h Outdated
@luadebug
Copy link
Copy Markdown
Member

luadebug commented Oct 4, 2025

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the custom shared pointer implementation by renaming _ to AArc and _weak to AWeakArc. This is a great improvement for code readability and maintainability. The changes are mostly consistent, but I found one minor inconsistency that I've commented on. A more significant issue is that the test files using the old API (e.g., aui.core/tests/SharedPtrsTest.cpp) were not updated as part of this pull request. Please update the tests to use the new AArc and AWeakArc types to ensure the refactoring is complete and correct.

*/
template <typename T>
static _weak<T> weak_from_this(T* raw) {
static AWeakArc<T> weak_from_this(T* raw) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While the return type is correctly updated to AWeakArc<T>, the implementation on line 224 still uses the deprecated _weak<T> alias. For consistency with the rest of the changes in this PR, it would be better to use AWeakArc<T> here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design Architecture proposals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants