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

Add make as an alias for make-instance*. #26

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Conversation

aartaka
Copy link

@aartaka aartaka commented Dec 6, 2023

This adds yet another alias for make-instance*: make. It's mainly here to make the exported API more consistent: there are both star-suffixed and star-less versions for most constructs in Nclasses, but there's no star-less version of make-instance*. So here it is: make.

Edit: make-instance -> make-instance*.

@Ambrevar
Copy link
Member

But wait, my first guess looking at the make alias is that it's a shortcut for make-instance, not make-instance*.

Wouldn't your patch be counter-intuitive?

@aartaka
Copy link
Author

aartaka commented Dec 11, 2023

But wait, my first guess looking at the make alias is that it's a shortcut for make-instance, not make-instance*.

I don't understand. Where exactly?

@Ambrevar
Copy link
Member

I mean if we add make as an alias, I wouldn't be surprised if users would assume it to be an alias to make-instance instead of make-instance*.

@aartaka
Copy link
Author

aartaka commented Dec 11, 2023

I mean if we add make as an alias, I wouldn't be surprised if users would assume it to be an alias to make-instance instead of make-instance*.

That's a problem with DWIM-ish aliases in general. We already provide define-class and define-generic which also seem to be related to the respective standard functions, so make's not the only point of confusion.

The good news is: define-class, define-generic, and (the suggested) make are all backwards-compatible with their standard counterparts. Even if the confusion happens, one's safe to use make as make-instance.

@Ambrevar
Copy link
Member

Fair enough :)

@aartaka aartaka merged commit 929c69a into main Dec 12, 2023
1 check passed
@aartaka
Copy link
Author

aartaka commented Dec 12, 2023

Merged as 929c69a.

@aartaka aartaka deleted the make-instance-make-alias branch December 12, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants