3 ms·
> The difference between adding symbols to a language with product types (i.e. consing) and simply having algebraic data types in your language is that symbols
by sedachv 10y ago
> The difference between adding symbols to a language with product types (i.e. consing) and simply having algebraic data types in your language is that symbols are untyped, and so you're allowed to compare apples and oranges (they're inequal). This isn't terribly useful, as it's almost always a mistake to do it.
You are taking one trivial use case of Lisp-style symbols (enums) and completely ignoring their value as first-class identifiers that come as part of the language.
> Lisp is the "hold my beer, I know what I'm doing" of functional programming languages.
Lisp is not a functional programming language.
- msdos 10y agoLisp is not a functional programming language. ?
- somethingsimple 10y agoIt's a multi-paradigm language. You can use it for functional programming, but it's not strictly a functional programming language.
- jwdunne 10y agoYes. In fact, the point with symbols and code as data is that you can implement different paradigms in the language itself. A program implementing prolog, for instance, is an example program in books.