Or the exception model of Common Lisp, which is designed for always being able to recover.
2,368 karma · joined May 18, 2017
Or the exception model of Common Lisp, which is designed for always being able to recover.
That's just your opinion.
It lacks lots of features to get there:
- you can't dwell into the browser internals (or modify them), and the internals aren't written in Js.
- you can't save the running state of the system to disk
- as a language, JavaScript even in its current spec is still behind Common Lisp in power and features... For example, even decades later, lisp s-expressions are still superior to JSON!
etc etc
Only with Smalltalk. And then, Common Lisp has a more powerful OOP system and usually runs faster.
Note that sbcl is just another Common Lisp implementation, you could use others as well.
Well, it has, in a way: see the latest C standard and compare it with the Kerninghan&Ritchie edition.
That's what you think. Transistors have evolved a lot, as have programming languages.
So they chose to create a language where there's no way to get around creating vast amounts of boilerplate. This boilerplate heavy code style results in having no idea of the true logic you are hiding in all of the boilerplate.
more like the 60s, with a primitive type system, no metaprogramming, no interactive development, etc.
It is still outdated design, right from the 60s. Already in the 70s we had better, interchangeable data structures, like s-expressions for example.
We know that one can do "macros" in many other languages including of course TCL. The question is how difficult is to do them and how easy is to have control over there. Lisps, due to code being s-expressions, make macro creation extremely easy, and Common Lisp has useful tools to ease working with macros, for example macroexpand, which is integrated into most Lisp IDEs to easily visualize, in-place within the code, how a macro will expand into, step by step.
In comparison to that, most languages that do allow macros, make it a cumbersome, buggy task.
What does "turn spheres inside out" mean?
>with no tearing
Is this painful?
Ah, so Common Lisp then?
Cycorp? Do you need more Lisp developers? I'm trying to switch jobs.
Rust's default behavior of ignoring integer overflows when not in debug mode -to put an example-, put it very close to C.
This. Lisp at least 10x faster in the worst case; it can be made to run even faster...
Yes, that's the Meta Object Protocol. It isn't on the standard, yet most Lisp implementation have it, and now you can use it in a portable way as well.
>If it's the former, I would say that optimizing a small core is easier than optimizing a big language. Python's core is 200-400K lines of C
Common Lisp's "core" (that means, not including "batteries") is considerably more involved and complex than Python's. Creating a new CL implementation is a big deal.
You get ultimate flexibility and malleability with the former and elegant correctness with the latter.
Object Pascal
D
ATS
Common Lisp
Ada
even Fortran!!
the list can go on and on
One core feature of any Lisp dialect is that you can extend the language using Lisp.
Thus, you don't need to "change" the language spec or write a new compiler to extend (and thus modernize) the language.
The core of grammarly, a major, popular product today, is a Common Lisp program.
SBCL has the majority share. But it doesn't matter, since ANSI Common Lisp is a standard and my code runs on many CL implementations with no changes.
>a kind of distance from the operating system
Citation needed. A bit puzzling to say that when some CL implementations have fantastically easy FFI features (CCL, ECL, CLISP).
>“ports” instead fo file descriptors
We don't have this. Streams are streams, like in any other typical language. File paths are represented by... Pathnames (data type).
>vm memory dump to disk as a form of binary executable generation
1. The dump is part of the generated executable
2. Now compare to most dynamically typed languages: they can't generate an executable nor compile to machine lang.
3. "Memory dump to disk as a form of binary executable" is only true of the Common Lisp implementations that are able to save the image. ECL, for example, doesn't do that. It compiles to C and C gets compiled to Exe.
4. Being able to save and restore images is one of the best features of CL (and Smalltalk as well)
>So lisp has some cool things but will never likely become a mainstream language
You need to review your history, since Lisp was a mainstream language in the past. To put an example, it was #3 in the TIOBE index for 1989, #5 for 1994.
I can relate to that feeling.
>why so few large projects have been written in a LISP or LISP descendant
The major dialect of Lisp, Common Lisp, is strongly typed, and many large projects have been written in it, for CAD/CAM, controlling a NASA spaceship, complete operating systems (Open Genera), the Mirai 3D graphics suite used for creating Gollum in "the lord of the rings", etc.
That's their loss.
If I wanted a language with "only one way to do it", i'd use Brainfuck. Which, btw, is very easy to learn, well documented, and the same source code runs on many, many platforms.
Custom data types can be defined
Data types can be checked,
Functions can be dispatched on the data type of the input parameters (see CLOS),
Variable types can be declared.
... so, Lisp isn't a "typed language"?
>Quicklisp is still in beta and is in no way even close to package managers like cargo or npm.
QL is already better than NPM and PIP. It says "beta" only because the author is modest; it already has years of releases and development.
Maven is a better package manager, though.
To pick just an example: Anybody can create a Brainfuck (programming language) interpreter in a few lines of Python or Js code.
With Common Lisp you could create a Brainfuck compiler (that compiles down to native code and thus has native code speed) in the same amount of lines of code. Or maybe shorter.
A different example: The circle-ellipse problem. It is solved easily in Common Lisp (few lines of code), because the CLOS OOP system is more powerful than the OOP systems in Java, C++, Python, Javascript and many other languages.
On a typical language you have "structures" you mention, like "if", "for", "switch". Lisp also has them, but they look more like function calls. The syntax has a lot of less noise.
Automatic indentation helps you visualize such "structures" in an easier way. It's not any more difficult than using a language like Python or C.
>And LISP, shares a problem with most dynamic languages that anything can kind of go anywhere.
Not really, because Common Lisp -the major Lisp dialect- is a strongly typed language, unlike the most popular dynamic languages: Javascript, PHP and Python and Ruby (Python & Ruby being 'duck typed' for the most part). And unlike the famous weakly-typed statically-typed language: C.
So no, "anything" can't go anywhere, because a type mismatch will cause a runtime error. And in CL you can correct runtime errors by modifying the source code and resuming program execution (without having to restart the complete program), so no big deal either.
The most common data construct, the Lisp list, accepts any kind of data type inside, but Lisp also has structs, objects and arrays, all of which can be defined for specific data types. Note that the ANSI Common Lisp standard includes extensive support for type declarations.
Not to mention that Lisp, unlike other languages (Java, C++ -- i'm looking at you guys) don't erase types at runtime. Lisp works with values (not variables) , and values are typed. Any value, in Lisp, carries its type information at runtime.