<div dir="ltr">I agree that "copy and mutate" sounds like it might not be compatible with declarative programming, but I think there are deeper psychological principles that make Self worth understanding even if you don't want imperative programming.<br><br>I don't know whether you've heard the prototype spiel before, and Dave and various others here can do it better than I can, but:<br><br>Part of the motivation behind prototype-based languages is that when human beings come up with categorization systems that feel intuitive, they usually don't really look like "here are the properties that are shared by every member of this category"; they look much more like "here are some properties that are typically shared by the more-central members of this category, most of the time; membership in the category is fuzzy, and varies depending on how similar the thing is to the central examples of the category; we define things by describing how they're different from other things." (George Lakoff makes the case for this in Women, Fire, and Dangerous Things.)<br><br>For example, here are some observations about the way humans categorize things:<br><br>  - A robin is a better example of a bird than an ostrich is. (Membership gradience - some examples are more central than others, and people more-readily identify the central examples as belonging to that category.)<br>  - Most humans have ten fingers, but a few don't, and they probably still qualify as human. (Family resemblances - not all properties are shared.)<br>  - If someone shows you a picture of a tabby cat and asks you what it is, you say "cat", not "animal" or "tabby". (The most cognitively-basic part of the abstraction hierarchy is somewhere in the middle, rather than the top or bottom.)<br>  - etc.<br><br>(Of course, human beings also came up with the more-rigid categorization systems that are used in most of mathematics, and those systems still sorta-kinda count as categorization systems, despite not having all of the properties that the more-typical categorization systems have. ;))<br><br>I'm not saying that you *can't* find some way to represent those kinds of qualities in a class-based language like Smalltalk or a type-theory-based language like Haskell; I'm just saying that these considerations are (as far as I've seen) not even really on the radar of people who talk about those languages. (Which isn't to say that Self does it perfectly. I don't think Self - or any other prototype-based language that I know of - fully captures the flavour of the categorization model that Lakoff describes. But Self's "you make new things by copying and modifying existing things" is meant to be a step in that direction. It's something that the Self people have spent some time thinking about.) If you buy Lakoff's theory, there's something in human psychology that isn't a good fit for the kinds of rigid categorization systems used in existing declarative languages like Haskell.<br><br>With that said, I've spent the past few years learning about Haskell and functional programming and type theory and category theory and proofs and various other things that I used to consider icky, and I like it very much. I'm convinced that it's usually a very good idea to avoid imperativeness and mutation as much as possible, and I'm convinced that there's a huge amount of value in the kinds of mathematically-precise abstractions (functors, monads, algebraic data types, etc.) that are used in those kinds of languages, and I'm convinced that type systems are much much more-useful and less-awful than I believed back when the only typed languages I knew were C++ and Java. I wouldn't be happy going back to a dynamically-typed imperative language like Self (though I do desperately miss the Self environment). But I think there are some insights about human psychology that the Self people understand better than the Haskell people.<br><br><div>I'm not sure about this part, but I don't think those psychological insights are fundamentally incompatible with declarative programming; I just think it's the kind of thing that the declarative-programming world hasn't spent a lot of time focusing on. So, yes, I think there's a lot in Self's classless outlook that could light the way toward creating a better declarative language.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 11:52 PM Jack Waugh <<a href="mailto:tzh9741mq402@sneakemail.com">tzh9741mq402@sneakemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><font size="4">As I understand it, the Self language uses imperativity all the way down to its fundament. In particular, I believe the usual (and only?) way to set up an object is to clone an existing one (the prototype) and then mutate one clone. I don't see anything about the language, nor more generally about a classless outlook, that would light the way toward creating a good declarative language. Am I missing something?</font><br></div><div dir="ltr"><div><br></div><div>Jack WAUGH</div></div>
</div></div>
_______________________________________________<br>
Self-interest mailing list<br>
<a href="mailto:Self-interest@lists.selflanguage.org" target="_blank">Self-interest@lists.selflanguage.org</a><br>
<a href="http://lists.selflanguage.org/mailman/listinfo/self-interest" rel="noreferrer" target="_blank">http://lists.selflanguage.org/mailman/listinfo/self-interest</a><br>
</blockquote></div>