Skip to content
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

Allow declarator docs on phasers? #409

Open
rcmlz opened this issue Dec 9, 2023 · 4 comments
Open

Allow declarator docs on phasers? #409

rcmlz opened this issue Dec 9, 2023 · 4 comments
Assignees
Labels
fallback If no other label fits

Comments

@rcmlz
Copy link

rcmlz commented Dec 9, 2023

Reading the discussion about RakuDoc and decorators in the advent calendar 2023, I am wondering if there could be an option to get decorators attached to e.g. PRE and POST phasers of methods or subs - in a similar way the leading and tailing decorators can be fetched from methods/subs.

I am thinking towards the way that the special sub MAIN is handled (very conveniently from a users perspective) … to e.g. enable auto generated ToolTips for instance in Jupyter, or autogenerated documentation, which might be a USP for Raku, especially in educational environments.

IF there is added value in attaching somewhat standardized documentation to objects/methods/subs etc. (e.g. Editor support) THEN people consider making this extra effort.

Same as for MAIN - I assume you see a lot of developers using the convenience features for specifying the signature, because it gives an immediate added value to the developer.

So if this magic would not just happen for MAIN but for all ordinary objects/subs/methods/Phasers etc., then ….

@rcmlz rcmlz added the fallback If no other label fits label Dec 9, 2023
@lizmat
Copy link
Collaborator

lizmat commented Dec 9, 2023

OOC, why would this be applied to PRE and POST phasers only? Why not to KEEP and UNDO as well?

FWIW, I don't see a use case for the other phasers, but I could be missing something :-)

@lizmat lizmat changed the title declarator docs on phasers Allow declarator docs on phasers? Dec 11, 2023
@rcmlz
Copy link
Author

rcmlz commented Dec 11, 2023

Aggree, there seems to be no reason why to limit decorators only to PRE and POST.

@raiph
Copy link

raiph commented Dec 11, 2023

Hi @rcmlz

I'd like to suggest you consider further fleshing out some things related to this issue you've started. I've written a gist about that.

@rcmlz
Copy link
Author

rcmlz commented Dec 12, 2023

I added a few thoughts and some illustrative code to the gist. My base-line is: as long as Raku has no or only basic support in editors/IDE's, it might be more important to focus on syntax highlighting, auto completion and exploiting the already existing features/concepts of Raku. Putting in another feature into Raku that does not easily reach the target audience, is at best questionable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fallback If no other label fits
Projects
None yet
Development

No branches or pull requests

4 participants