Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

docs: add explanation for NotDispatchable declaration#180

Closed
woeoio wants to merge 1 commit into
twinbasic:mainfrom
woeoio:patch-1
Closed

docs: add explanation for NotDispatchable declaration#180
woeoio wants to merge 1 commit into
twinbasic:mainfrom
woeoio:patch-1

Conversation

@woeoio

@woeoio woeoio commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Adds a concise explanation of why and when to use NotDispatchable:

  1. avoids IDispatchoverhead for better performance

  2. enforces early binding to improve type safety

  3. recommended for internal and utility classes

Helps developers understand the intent behind this declaration without digging into implementation details.

Update internal utility classes to explicitly declare NotDispatchable. This change enforces early binding to improve type safety and reduces runtime overhead by bypassing the IDispatchinterface.
@woeoio woeoio changed the title refactor(class): mark internal classes as NotDispatchable docs: add explanation for NotDispatchable declaration Jun 10, 2026
@wqweto

wqweto commented Jun 10, 2026

Copy link
Copy Markdown

. . . highly recommended to use NotDispatchable

I'm not sure where this comes from. If it was highly recommended then language creators would have made NotDispatchable the default choice.

NotDispatchable description has to include the many cons (along with the few pros) and then mention that it is an advanced technique that is not recommended to every class but only if there is a requirement not to have IDispatch and the developer is aware what they are doing.

@woeoio

woeoio commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Oh, ha ha, okay. Thank you for your correction. I'll turn off pr

This is a question I encountered while reading the document in the morning. After looking up some materials, I found it was a good thing and mistakenly thought that the document should explain this matter in more detail.

Now it seems that it would be better for you professionals to explain and describe it

@woeoio woeoio closed this Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants