-
Notifications
You must be signed in to change notification settings - Fork 372
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
Rename defn
to def
and defclass
to class
#2018
Conversation
To reiterate, the motivation here is better consistency with Python. These special operators are our direct equivalents of the Python keywords, so using the same name helps the user avoid accidentally mixing up Python and Hy conventions when switching between them, as one often needs to do as a Hy programmer. Using a different name from Python makes sense sometimes, for sure, like how we use the shorter |
I don't really like this idea. As I said in our previous discussion, I just think that using |
Okay, with you opposed, I would likely need both @allison-casey and @scauligi to agree in order to get this change. What do you guys think? You seemed supportive in #1975. |
For what it's worth, we used to have |
I know I'm not a contributor, but in my opinion I don't see a major reason to have Hy even closer to Python. The major reason I was attracted to it was because it was a Lisp I could continue to use even when my work needed Python. Those coming from Clojure and such would have an easier time transitioning, and as someone who just started using the language a week ago and am already fully comfortable, I think I'm an example of that. Python devs wanting to learn Lisp have a smoother transition, as they can still use their Python comforts here while learning the macros and further styles of Lisp. Those are my two cents at least! |
I've come around to peace's point of view on this one since we last talked about it in #1975. the |
Okay, F to this proposal. |
I haven't actually made the changes yet. I opened this PR to check for sufficient agreement before I forge ahead.
Anyway, I'm thinking this is a good time to do this because then
defn
will get renamed todef
and lambda lists will change in the same release, so users can use which keyword is used in a Hy program as a hint as to whether the code has been updated.