Lisp Enlightenment and Emacs Frustration
erik-rasmussen.com
erik-rasmussen.com
But whatever the case, emacs should not be a barrier to Lisp. I might even recommend for new Lisp users: avoid emacs. First learn Lisp. Play around a bit. Most of your environment should be the REPL, and you can copy-paste from your favorite editor. You can use "(ed)" in the REPL. Go from there. Then, later on, try to get emacs to work with your Lisp. Mainly, you will want to experience the interaction, the environment with Lisp. Finally, switch back to vim when you are ready to get your real work done quickly.
I couldn't help the last line... :) Use both editors, depending on your immediate need. But learning Lisp is separate from learning emacs.
I do think that I'm probably missing some nice things that SLIME has that I don't currently take advantage of, because I usually just treat my lisp programs much like other programming languages: I write all my code in an editor (VIM), and then I hop over to a terminal and just run "sbcl --load file.lisp". The interactive piece is probably nice, and may be a little faster, but for what I'm doing, this is is all I need. Besides, this is pretty much how I program in every other programming language anyway.
You may add sucking as a Lisp to that list of virtues.
Surely, it will not be easy -- there are some problems visible even from distance. One of them are people like me who grew accustomed to Emacs' idiosyncrasies -- they're small problem. The big one are people who firmly believe that C-f,b,n,p, C-y/M-y, mainly useless functions having single-key bindings and really useful ones concealed under complicated binding, like C-x b or C-x o, or without any binding at all, like replace-string or query-replace, etc, is the way to go.
[1] Well, I may be biased, however I already use emacs commands automatically e.g. acquired some muscle memory and some things actually are better in vim - after long coding I can actually feel some strain from pressing C-M, and navigation still is much slower, and I doubt it will get faster with time.
And what's the downside of customizing this? Not being able to use someone else's Emacs? How often does that happen? (Never mind that you could – for the sake of your co-workers – switch between overridden and default bindings).
As a first simple step: Sticky keys. This way nobody has to hold down any modifiers for a long time. Easily enabled in most operating systems (or with a bit more trouble within Emacs itself).
I think the poster implicitly points out something interesting---that Java and Common Lisp are both large languages that require sophisticated tools to use effectively. I'm not talking about Emacs versus Eclipse here, I mean the toolset in your brain. Money quote:
"IntelliJ makes Java programming as easy as it can possibly be. It more or less compiles your code as you type it, points out most bugs as they occur, intelligently suggests code completion to finish your words for you. I generates all the annoying repetitive code, like getters and setters and equals() methods for you. Without it, Java would be much more laborious to program in..."
So to Java users, writing annoying repetitive code is a life-saving feature of the IDE, whereas for Common Lisp it would simply be bad style.
I'm using emacs just several days.
I've used: vim, visual studio, Delphi/CBuilder IDEs, PyScripter, notepad++, PL/SQL Developer, TOAD, others.
What I found pleasant in emacs: It does not have learning curve at all.
All I need to figure is just Alt-x (M-x). Than it became fun.
I've read documentation only for cua-mode. Everything else was found through guessing and experimentation.
Of course, maybe I'm just novice and I do not know some hidden emacs dangers, one day they will pop up and bite my ass. Dunno.
Eta Someone indeed pointed this out as the first comment in 2007.
====
Java has very few original features. However, it did serve as a sort of 'feature aggregator', where it pulled in a very large pile of features from other languages and housed them all under one roof.
What I (vaguely) remember about Java from the early days as being it's (other) main advantages were:
(1) incredibly easy networking (compare sockets with C for example)
(2) applets (yes they suck(ed), but no other language had that browser adoption)
(3) it wasn't Microsoft (not such a big deal now, but back in the day Microsoft were a lot more aggressive)
(4) it was open(ish) (you could look at the library code to figure out how it was doing stuff) (compare with Visual Basic where everything either magically works or magically doesn't)
(5) Threads (compare again to semaphores)
(6) Free (as in beer)
In some cases, such as early Java, I think a feature most people don't really take into account is not what was put into the language, but what was left out. By hiding pointers behind the curtain, it made the language a lot easier. Easier to write, and easier to read. Even then it had its wrinkles, the people I know who were uber-productive in Java tended to use a small subset of the languages features.
Over the years of course feature creep has slipped in, so it now has bits of perl (regex) and bits of C++ (templates/generics). A lot more of the base code is a lot uglier than it used to be....
====
As for Lisp, I don't really buy the argument that lack of a good IDE held it back. I think the following reasons are more to the point:
A) butt ugly syntax (I'm talking about the random lengths of indents, not the ()s - to understand why this is bad, go learn you some usability)
B) greedy corporate interests (if the developer kit for Java had cost $10,000 no one would ever use it either) (early on)
C) language fracturing and speciation (there are too many 'little lisps' for any one of them to gain momentum) (later on)
D) lack of well written textbooks (compare to the veritable explosion of books for Java in its early days. Back when I was actually interested in Lisp I used to pick up books on it, and they'd invariably spend the first 2 pages showing some vague equivalency to lambda calculus and then it seemed as though they felt their teaching duty was done)
speaking of the lambdas...
E) programmers got better at naming variables and functions (having anonymous functions may be a neat party trick, but nowdays when we put on our big boy pants we like to name stuff)
F) missed the OO boat because they were too caught up in their own cleverness (early OO implementations in Lisp were butt ugly and broken (didn't do encapsulation and/or inheritance well)).
You may argue (as the author of the original article does) that currently Lisp does wonderful OO, but you have the same problem as say Java does, overcoming the slowness myth(s).
I wonder if it is possible to predict the critical junctures where the myths about a language solidify. In any case, it doesn't help to make a new lisp with more/better/faster features (in an attempt to create new myths), because that just feeds the confusion (see point C above)
edit for irony: missed a )
1. How do I program? I dont know how to build abstractions. I dont know how to write correct, modular and reliable codes. I'll start with "How to Design Programs"
2. I want to learn more about recursion. I want to master thinking recursively because I have found that they solve a lot of my problems. Let me see "Little Schemer".
3. I want to learn more powerful constructs like continuations, tail calls and what not. I want to learn to solve harder problems in Scheme. Let me pick up "Seasoned Schemer".
4. Wow macros are pretty nice. I want to learn more about them. Let me first see how to write unhygenic ones. Paul Graham's "On Lisp" is amazing!
5. Constructing higher levels of abstraction is something that I really want to master. What kinds of abstractions can I build? What are the ways to construct large programs? What is the way to organize programs? What is programming? Let me read SICP
6. What is a loop? Why doesn't scheme have it? How can I build it? How do I build these kinds of abstractions? Wand's EOPL is my bible at this stage.
7. Let me do something useful in Scheme. How do I write much more powerful macros? I love my types. I love my modules. I love my libraries. Racket, I think you are the most powerful thing out there.
Considering lisp - I don't see what is wrong with indentation - they actually have something to do with logical structure of code, (also I don't get whats wrong with their usability - for me this 'random indented code' is readable). Speaking of too many lisps - one could as well say that there are too many C-like languages : C, C++, C#, Objective-C. They are all different languages, no some forks of 'The Lisp'. Considering books - well, I've read few of them and none mentions lambda calculus (unfortunately, I'd eagerly learn something about that) - e.g. PCL, 'On lisp'. Also, I think you completely miss the point with lambdas - they are necessary when you are using higher-order functions and naming them would be pointless.