4 ms·
The problem with Lisp is that there are different dialects, and if you program in more than one, you need to be aware of the differences between them. It woul
by DonaldFisk 3y ago
The problem with Lisp is that there are different dialects, and if you program in more than one, you need to be aware of the differences between them. It would be nice to be able to switch between them on different projects without being caught out by their differences before getting used to the other dialect, or having to context-switch. It would also be nice to port programs from one dialect to another without major editing. But Picolisp is another dialect, which on the surface is quite different from Common Lisp and Scheme/Racket and, I assume, Clojure. If you want to keep your Lisp implementation small, why not just implement a subset of Common Lisp, or build/use a Scheme variant?
- monsieurbanana 3y agoLisp is a family of languages, not any single one. There's (thankfully, lisps needs innovation like everything else) room for different types. In the C family for example, you have both C and Javascript. > It would also be nice to port programs from one dialect to another without major editing If the languages are the same, they wouldn't be different dialects, they would be the same language, so porting them doesn't make much sense. I think the closest thing to what you're describing is Clojure, where you can swap the targeted environment (JVM if you're working on a server, babashka if you're making a script, javascript if it's a web app, dart/flutter if you're making mobile apps, etc...)
- dragonwriter 3y ago> In the C family for example, you have both C and Javascript. There is no reasonable sense in which JavaScript is in the “C family”. It's not really even in the broader Algol family that C is in, being most closely related to Self and Scheme (the latter being in the Lisp family.)
- monsieurbanana 3y agoI just took a random example from the wikipedia page of C languages: https://en.wikipedia.org/wiki/List_of_C-family_programming_languages https://en.wikipedia.org/wiki/List_of_C-family_programming_l... I don't think that takes away from my point, in each family of programming languages you can find very different ones and lisp is not a language but a family of languages. Besides using S-expressions, I don't know what else you would need to be considered a Lisp.
- DonaldFisk 3y agoIf you know C, you don't need to learn a new syntax if you learn C++, Java, C#, or Javascript, except where their semantics is different from C. In those languages, this was a good design choice, which encouraged people to adopt those languages.
- lispm 3y agoA language syntax is quite a bit more than { }.
- hencoappel 3y agoC family here refers to syntax style. In this case the general use of curly braces to denote blocks and often semicolons to denote end of statements. Another example of such a family would be the ML language family with languages like Haskell and F Sharp.
- akkad33 3y agoIs Haskell in ML family? I know Fsharp and Ocaml are but Haskell seems to be very different from them synctically with the only similarity being that it is functional
- DonaldFisk 3y agoC and Javascript are very different languages with similar syntax. Common Lisp and Picolisp are very similar languages/dialects with different syntax/function names. Common Lisp based its syntax on Maclisp so that Maclisp code could run without much alteration on common Lisp systems.
- mrighele 3y ago> C and Javascript are very different languages with similar syntax I don't know specifically about Picolisp, but many lisps are as different between themselves as C and Javascript are. For example, Scheme is a functional language, while Common Lisp is multi-paradigm One has only lexically scoped variables, the other has also dynamically scoped variables. They have two completely different macro systems (hygienic vs non-hygienic). One has continuations, the other doesn't. These are just the few that come to my mind right now. Those are not trivial difference, they completely change the way you reason about you program, and what you can do with it.
- soegaard 3y agoScheme is not functional per se. Scheme the language supports multiple programming paradigms. The culture pushes people towards functional programs, but having mutation available has always been part of Scheme. Most Scheme implementations also offer some sort of object oriented solution.
- actionfromafar 3y agoI first read “suffer from some sort of object oriented solution”.
- lispm 3y agoScheme exists in various forms and standards. There are small educational definitions and implementations which provide most SRFIs and thus have all features of CL and more. https://srfi.schemers.org https://srfi.schemers.org At its core Scheme is procedural, imperation and functional. Common Lisp is also "object-oriented" in its core.
- Chris2048 3y ago"port programs from one dialect to another without major editing" isn't the same as "the languages are the same", so why did you parse it that way?
- bbbobbb 3y agoThis only sounds like a 'problem' because the lisp dialects are so similar that you would almost expect them to be the same, no? That seems like a nice feature - you know Common Lisp so you have to only learn some nuances to write PicoLisp effectively. When it comes to the c-family of languages, you wouldn't expect a complaint about having to be aware of the differences between C and JavaScript since you can't even entertain the idea that they are all that similar.
- anonzzzies 3y agoI have my own libs that equalize lisps/schemes for everything I use it for. That really wasn't that much work. I don't work with clojure because I insist on s-expressions all the way, so I cannot speak of that.
- whartung 3y agoThe problem is vocabulary. There's no mistake that there's a lineage from, say, C to JavaScript. Nor the lineage along the line of S-expression languages. But when folks speak of JavaScript, or Java, they never refer to them as "C" or "a C". But when something is written in a S-expression language, suddenly it's all Lisp. "3D graphics is Lisp!" is the headline, then you learn it's some S-expr language that is not Common Lisp. Common Lisp is a Thing, much like C is a Thing. There are several implementations that call consider themselves compatible with Common Lisp. It has the closest ties and heritage to Lisp 1.5 ("the" Lisp). Scheme is a thing. When it comes to the "family of languages" idea, Scheme is most certainly practiced that way. There are a LOT of Schemes out there, all with various levels of compatibility and conformance to the assorted Revised Standard documents, but at the same time they all solve different problems. At a time there were several Lisps, but they were all essentially merged into Common Lisp. Now, we have "one" Lisp, and Scheme. Scheme forked off down its own branch, making conscious decisions to differ from the Lisps of the day. It's fair to point out that two Lisps survived that time, the other being Emacs Lisp. Then there's things like Clojure, AutoLisp, or even this PicoLisp which are S-expr based languages, but that's about where the similarity ends. They're as much the same as Java and C, and probably not even that close to be honest. I ported some simple C to Java. It was a fairly trivial mechanical conversion, but 80% of the code just drag and dropped across. But I would never call Java a C or vice a versa. Pascal is not an Algol, despite the heritage. "Structured programming language" is the vernacular. All of them are that: Algol, Pascal, C, Common Lisp, Schema, Java. But, of course, we don't disuss the s-expr languages in those terms, even though they are, indeed, supportive of "structured programming". When I see "Lisp" I think Common Lisp. Lisp == Common Lisp, Scheme == (one of the) Scheme, Emacs == Emacs Lisp (we almost never hear of someone doing XXX in "Emacs Lisp", it's almost always just "Emacs"). That's how I divide up the world. PicoLisp is as much a Lisp as Java is a C.