top | item 9078697

(no title)

chrisduesing | 11 years ago

> You know the term REPL, right?

Yes, and notice how it doesn't stand for Rrepl-Evl-Princ Loop.

> There is a good rationale behind those names.

No, there is a good rationale for having separate functions, there is no logical rationale for prin1, princ and pprint.

Let's take "prin1 produces output suitable for input to read." from the link you provided. Since we are redesigning the language anyway, let's call that evalable-print or readable-print, or anything else in the world that semantically captures it's meaning. Because when you have a language with hundreds of obtusely named library functions it requires an unnecessary amount of cognitive load added to the already taxing act of programming. Functions that are easier to remember are directly related to code that is easier to read and understand.

discuss

order

chaoky|11 years ago

Well, those functions are pretty much obsolete. No one uses them. They are only in the standard for backwards compatibility (and don't use that as an argument because that is a legitimate reason and those names are easily ignored. they are not taking up a precious name-space). Everyone binds special variables like * print-readably* , * print-circle* , * print-base* which, would you look at that, have nice comprehensible names. Prin1 doesn't have any cognitive load on beginners at all since no code written after 1984 has prin1. I guarantee you that all the names _you_ would find esoteric in Common Lisp have less esoteric equivalents. (car => first, cdr => second etc..) And pprint? well, that's a commonly accepted name even in the python world for pretty-print. I guess most of the names you complain about is things that you haven't seen in Ruby and aren't familiar with. On the other hand, I can easily argue that in your code snippet above that {|i| ...} looks like garbage to me since every language _I've_ encountered uses lambda(x) = x ... or x, y => ... for something as fundamental as lambda functions. Of course, this would be ridiculous for me to argue since every language has their differences in names and syntax that simply don't matter compared to the actual concepts themselves.

bmh100|11 years ago

Is there a reference somewhere about what functions are no longer used by modern Common Lisp programmers? That would be very valuable for someone wanting to learn more about the state of the language today, instead of accidentally stumbling upon outdated practices.