4 ms·
If you're interested in something lile this, then check out the Smalltalk family of languages. They're similar to Lisps in the sense that the environment is com
by trashburger 4y ago
If you're interested in something lile this, then check out the Smalltalk family of languages. They're similar to Lisps in the sense that the environment is completely programmable (metaprogramming is just regular programming); however, whereas Lisp uses source code to create new forms and perform metaprogramming, in Smalltalk there is no source code. In Smalltalk-based languages, you perform metaprogramming by acting on live objects (the "source code" is just an in-transit format for the true form of objects).
- lispm 4y agofor Lisp see CLOS & MOP: object-oriented meta-programming in Lisp https://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Protocol https://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Prot...
- Qem 4y agoThe Pharo MOOC os a nice place to start getting familiar with the Smalltalk family. https://mooc.pharo.org/ https://mooc.pharo.org/
- igouy 4y ago> … in Smalltalk there is no source code. Please explain why you think that might be "a good thing". (Assuming you do.) Please explain what you think are the differences between "source code" and "an in-transit format" that would allow us to distinguish one from the other.
- xkriva11 4y agoThe more important aspect of the Smalltalk approach is that the method is the basic unit (like having one source file per method). The difference is that the grammar of the transit file is not the language's grammar.
- igouy 4y ago> … in Smalltalk there is no source code. Good? Bad? Unimportant? > … method is the basic unit… Are there method definitions outside the context of a class? > … not the language's grammar. GNU Smalltalk?
- xkriva11 4y ago> Good? Bad? Unimportant? It was not me who wrote that so I do not know his meaing. > Are there method definitions outside the context of a class? As I said above, I was talking about the basic compilation unit and it is simplified perspective. > GNU Smalltalk? Well, that's an exception :-) But I must note that not a nice one. About 15 years ago, I read an article about a novice evaluating Smalltalk based on experiences with GNU Smalltalk only, and he was complaining about how strange and crazy the grammar is with all that exclamation marks.
- igouy 4y ago> … so I do not know his meaning. So how can you say some other aspect is more important :-) (Please provide some explanation of what you think is important about " method is the basic unit".) > … the basic compilation unit … Object subclass: #MoreBasicCompilationUnit instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: ''! !
- xkriva11 4y ago> So how can you say some other aspect is more important :-) My opinions only :-) > (Please provide some explanation of what you think is important about " method is the basic unit".) I think it has many interesting consequences. The methods have only a few explicit dependencies required for compilation; they are not dependent on each other, they may be loaded and presented in any order, and the compilation is very fast. As I said, it may be comparable to having every small method in a single file. With such a setup, the code editor itself starts to lose its importance - everything on the level of notepad basically does its job. You need to focus more on the processing of the code as code objects graph. Not as a text file to edit, which may be an important shift in thinking. Incremental compilation is not related to that directly. And yes, you still need a way how to define classes which Smalltalk file-out format does do as simple do-its, which is not a fortunate solution for statical analysis of the given file.
- igouy 4y ago> … method is the basic unit… Are you explaining what a Smalltalk browser is like? https://files.mtstatic.com/site_7337/32007/0?Expires=1654646324&Signature=ivOukDHIo~nkbF868VnFnf0LVryxwyr2acbQeMdWjLTTk7J2VmvseLd9jm7Yw5512dcSn-klLpw5JYdSD1oGqomyxb8tZLSKcZ7zZedRFtkSqF4M-tn1beNDbl41xXE0N~kQPkJE-bLtZh~9CHKKtPrO~3IiF69u7rN0HOdBFLM_&Key-Pair-Id=APKAJ5Y6AV4GI7A555NA https://files.mtstatic.com/site_7337/32007/0?Expires=1654646...
- xkriva11 4y agoMeaning the basic compilation unit.