-
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
Add cons
pair to hy.contrib
#1709
Comments
I made the case against HyCons in #1576. The warts I mentioned could be removed in a fresh implementation, but it's still not clear to me if there are any circumstances where cons cells are more convenient than all the other data structures Python already has. The justifying example can be just as easily accomplished with |
This issue isn't a rehash of #1576; removing @Kodiologist, your statements—and parts of #1576—are actually asking about the meaning and/or purpose of For example, in Regardless, the semantics and usage of |
It's clear to me what cons cells and the
Can you provide an example that's concrete? You say that "recommendations to use |
Emacs and Common Lisp both have list construction and manipulations functions nearly equivalent to Python's/Hy's, so what exactly are they "good for" in those languages?
What example are you referring to? As I said,
The point of the expression Such approaches are fundamental to symbolic computation (and even historically, Lisp itself), where |
Probably the clearest example is that in those Lisps, expressions are made up of cons cells. So, you need to deal with cons cells in order to do much metaprogramming at all. In Hy, by contrast, expressions are implemented as Python lists.
What I mean by a feature being "good for something" is just that there's some circumstance or problem where it would be helpful. Having a practical purpose of some sort, in other words.
Those are entire libraries. Can't you be more specific?
Dude, I'm just asking for a concrete example. What's your problem?
Yes, that's the one. Am I wrong in thinking that |
They might be made from Otherwise, if you can clearly identify those instances in which they are needed—outside of the construction of those aforementioned Python-equivalent list functions—you might also find some other reasons for using As I said, there are quite a few existing resources demonstrating the non-list relevance for the combined use of
Sure, start by try to rewrite this function without some form of Furthermore, it's not apparent to me that all, more, or even some current Out of respect for those projects alone, limited |
I don't mean to imply that Emacs Lisp or Common Lisp would be worse off using their other data structures for their expression type. Maybe they'd be fine. But currently, they use cons cells.
Yes, since in Hy, expressions are Python lists.
That's fair. I weeded it once (#1189) and more weeding could conceivably happen. Certainly, any module that has no practical purpose whatsoever has no place in our repo. (Lookin' at you, botsbuiltbots.) I'm too much of a Perl programmer at heart to set more than a slight bar to new features.
All right, thanks. What exactly is the function intended to do?
We're still 0.x, so we don't deprecate stuff, we just burn it. |
In other words, we are not a mature software project. Yet. |
Version numbers aren't what make a project meaningfully mature, nor are they justification for enforcing the preferences of individual project members, and especially not at an unnecessary cost to the development community. They exist as a service to those communities, and only sometimes as a means of justifying destructive changes when they serve an agreeable purpose—usually one that's equal to or greater than the things they destroy. Community-based projects tend to become mature by actively respecting people's efforts and continually adopting and improving fair, transparent, easy-to-follow standards and practices, so that discussions like these become less and less frequent and necessary. Alternatively, without those elements of maturity, projects end up being driven by random individuals. |
We're still unstable and still have many major bugs. That's why I say we're not mature; it has nothing to do with respecting efforts or fairness or standards or transparency. So long as we're still unstable and have many major bugs, I think that worrying about backwards compatibility is premature. I'm sorry this is something you wanted that we haven't done, but this is an all-volunteer project, so things only happen when someone is personally interested in doing them, especially unglamorous things like maintaining backwards compatibility. Certainly I've never intended the version numbers of the Hy releases I've done to serve any communities. I've never served a community in my life, and I don't intend to start now! :) |
I'm closing this for lack of response, but let me know if you want to pick it up again and I'll reopen it. |
How does everyone feel about (re)-adding a
cons
pair class—and complementarycar
,cdr
—tohy.contrib
?The
cons
semantics are mostly necessary for work onadderall
andhydiomatic
, and extremely useful for adapting code from other Lisps, but its implementation isn't large enough to warrant a separate package, sohy.contrib
seems like the perfect place.If people are good with that, I can put in a PR right now.
The text was updated successfully, but these errors were encountered: