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

Questions on different design from lisp: Mal symbol do not use property lists? #637

Closed
TehLeo opened this issue Jun 22, 2023 · 1 comment

Comments

@TehLeo
Copy link

TehLeo commented Jun 22, 2023

In lisp each symbol has a property list. It looks like in mal a completely different design is chosen. What is the reason behind this change and what what are the advantages/disadvantages it brings?

I think this should be mentioned, so that users that are looking to learn how lisp works will not get an incorrect understanding. (Personally, I too checked this repository to learn a bit about lisp and then later found out that lisp handles symbols differently)

Lisp Property lisp:
https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node108.html

Lisp Symbol data structure:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Components.html

@wasamasa
Copy link
Collaborator

It's important to remember that MAL follows Clojure semantics, which is a Lisp-1 (same as Scheme and Picolisp). You're speaking of Common Lisp and Emacs Lisp, which are both Lisp-2. In a Lisp-2, it's common to implement independent function/value namespaces by stuffing several slots into a symbol (for example by using a property list). However, this isn't necessarily linked to being a Lisp-2. For example Picolisp does use property lists as well and some Scheme dialects allow accessing the property list, too. Overall, Lisp dialects seem to choose for or against this design based on whether they place importance on symbol manipulation or not (which Picolisp definitely favors). Given that MAL mostly serves learning purposes, symbol manipulation is not considered important at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants