LispStrawMen are arguments put forth against Lisp by those who do not understand the language and its culture. Usually [but not always] brought up in the context of a LanguagePissingMatch. ---- '''Strawman:''' () is humanly impossible to understand. '''Counter:''' But <> is the most natural language notation ever. The good thing about XML/HTML is that they made prefix parenthetical notation mainstream, because both end-users (HTML) and programmers (XML) have adopted it en masse. This trains users to understand it, and cuts away this particular StrawMan. * I'm not sure I've ever seen XML advocates suggest that <> are inherently better than (), come to think of it. (And of course, the delimiters in XML aren't < and >; they are and for some value of FOO). * And "parenthetical notation" has been been mainstream for a long time. Any C/C++ programmer knows what {} are used for; other languages use BEGIN and END or some such; none of these are fundamentally different from (). '''Counter:''' Mainstream languages have (); and {}; in a similar prefix way. Instead of foo(), you have (foo). It's not as different as people think. '''Counter:''' Syntax preference is generally a WetWare issue: everybody has a personal preference and one person's preference may not be the best for another. Also, I suggest replacing "hard to understand" with "hard to read". If people say parenthesis are hard for them to read, I'm not going to argue with them, for I don't and can't use their WetWare, barring illegal procedures. I will '''respect their personal preference''' as long as they don't insist it's a universal truth (without evidence of such). Also, a good code editor may highlight blocks such that "named enders" such as ...
are less helpful relative to parenthesis or braces; but then it's no longer just about textual language, but also about code editors; which leads to the epic Emacs Vs. Vi fights again? --top '''Comment:''' Mathematical conventions often have functions written with foo() instead of (foo). Like RPN calculators (note: I personally love RPN calculators), (foo) runs counter to common conventions. I think that's why many people complain about that particular Lisp syntax a lot and claim it's not easy to read. Unless you take the time to learn and use Lisp a lot, it seems unnatural (in the same way writing with one's non-dominant hand is unnatural for most). -- JimmyCerra * Related: UniversalStatement and MaspBrainstorming. '''Comment:''' First of all, two wrongs don't make a right. Second, *ML delimiters are and , which at least gives you an idea of _what_ the latter tag is closing. Third, languages like C/C++ do use parentheses, but they are only _one_ form of enclosing symbol pair, whereas LISP uses them for just about '''everything'''. Consider if (foo[i] > 0) { bar(); } It's immediately obvious that the braces enclose a block and the square brackets enclose an array index access. And writing (foo bar) where you mean foo(bar) in math notation ''is'' highly unintuitive, even if seasoned practitioners surely can get used to it. * not so sure about what is so u n i n t u i t i v e about: (when (> (aref foo i) 0) (bar)) * Did it occur to most of the anti-Lisp syntax bashers how _unnatural_ English feels for a French native? Or Russian for a Japanese? No matter what your background is, a computer language is first that: a language: you _have to_ learn it before you can use it. Syntax isn't my pet peeve about LISP, proper indentation and editors that highlight matching parentheses do help a lot, but anyway the syntax quickly gets rather hard to read. --ArneVogel ''That's odd. In my experience, lisp syntax is the easiest of all languages I have used for any length of time (thus avoiding the "you aren't used to it yet"). Your claim certainly isn't universal.'' '''Comment:''' People hated to read xml just as much as lisp, that's why there is so many AlternativesToXml, and now there is a huge trend to use json and yaml almost everywhere. Dylan looks like a nice alternative to ()... but there could be a lisp dialect with a strong community that didn't use () (and had a great emacs-mode :) * Lisp is hard to read for me because of the uniformity of the syntax, not because of the parentheses. { and } are for blocks in C-alikes, and easily spottable in the program. Of course, on the other hand the minimalist structure of Lisp is amazing, and it would be nice to have some middle-ground. I just don't have ANY clue how that should look. * '''Lisp programmers have standardized on code formatting conventions to a much greater degree than other language communities. This format is supported by Lisp-aware editors. This makes it easier to identify blocks and other patterns simply by the shape of the code. The parentheses don't come into it. In practice, it doesn't take long at all to develop this skill. ---- '''Strawman:''' '''Counter:''' That's Scheme, which is a different language with different aims and strawmen. Lisp isn't defined by ()'s. Dylan had conventional syntax but many consider it a lisp. Java and C look alike too, but an intuition about one does not translate to the other. Simply look at any popular Scheme text, like SiCp, HowToDesignPrograms, and TheLittleSchemer/TheSeasonedSchemer. At best you'll find a footnote about macros, which many people agree is an important distinguishing feature of lisp. However, there are some Scheme implementations which seem to offer lispish features, like PLT. And Scheme has certainly influenced lisp to evolve in good ways, like in the 70s when lisp had the unfortunate trade-off of offering only dynamic scope. Today's lispers benefit from having both lexical and dynamic scope, a duo that other languages are now reinventing under new names. ---- '''Strawman:''' Lispers are a bunch of meanies! Especially that one guy (ErikNaggum?) '''Counter:''' Not any more. Check out usenet; you'll find many friendly people proficient in multiple languages. While there is obviously a lisp bias, it does not cross over into religion. That one particular fellow has left, possibly for good. '''Counter:''' Someone is implementing a Lisp Machine's VM using OCaml. http://groups.yahoo.com/group/lispmachines/message/93 Lisp is a multicultural language, and nearly all lispers are proficient in other languages. When not faced with a StrawMan, they can offer good engineering justifications. But when faced with a StrawMan or artificial scenario, the level of conversation drops to what you'd expect, because it's not inspiring raw material for conversation. Lispers don't hate other languages, they just want to assimilate them. At least modern lispers do. ---- '''Strawman:''' Lisp only has lists as serious datatypes. '''Counter:''' Almost true, except for: symbols, hashtables, pathnames, multidimensional adjustable arrays with fill-pointers, one-way/two-way/synonym streams, strings with fill-pointers, integer/rational/complex/floating-point/big/fixnum numbers, bit vectors, characters, packages, structures, higher-order functions, readtables, code-is-data, association lists, OOP with metaobject-protocol/{before/after/around}-methods/multiple-inheritance/multiple-dispatch, errors/warnings/conditions... And lists. And some other things, too. ''The following comment was deleted immediately after it was made:'' * This issue seems part of a broader ongoing HolyWar about strong/static typing versus dynamic/weak typing. Lispers should not take it personally. ''I think that comment is misguided at best, and apparently highly confused, and conceivably even a troll, but rather than deleting it, it would be in better alignment with WikiNature to address it head-on, and explain why it is confused, than to simply delete it.'' ''To begin that: I don't see that anyone is taking anything personally, that sounds like a non-sequitur completely out of the blue. Nor do I see how typing of any sort (strong/static/dynamic/weak or any other) even arises in this context. The StrawMan was "Lisp has only Lists". What does typing or Holywars or taking things personally have to do with that??? Apparently, nothing whatsoever -- so I understand the motivation for deleting such a comment.'' '''Counter:''' While EssExpressions can be made to the shape of just about any data structure with conventions and wrappers, having the base structure be nested lists does sculpt the style and flavor of the language and libraries a certain way. Some of us feel that nested lists is a somewhat arbitrary choice. MaspBrainstorming explores maps as a base structure instead. -t ---- ---- '''Strawman:''' Lisp is slow. '''Counter:''' While there are application domains where Lisp's performance won't be acceptable, the general purpose performance of readily-available Common Lisp implementation CMUCL rivals that of Java. Further, Common Lisp's expressiveness and flexibility sometimes makes smarter algorithms accessible. Some anecdotes: * Lisp programmer writes a Perl-compatible regex engine in CL over a weekend on a dare. The CL engine is faster than Perl's highly-optimized C engine. (http://www.weitz.de/cl-ppcre/) * Troll on C.L.L. challenges Lispers to match the performance of the Coyote Gulch C++ ephemeris calculator benchmark. The Lisp version is faster. (http://home.comcast.net/~bc19191/blog/040308.html) * The Great Computer Language Shootout places cmucl and bigloo (Scheme) just ahead of Java. http://shootout.alioth.debian.org/great/benchmark.php?test=all&lang=all&sort=cpu ---- '''Strawman:''' The language often involves cryptic names that are far from communicable ("cons", "car", "cdr", "sexp", ...) '''Soft Counter:''' This only becomes a strawman if shouted loud as The Reason Lispers are Arrogant or something. These symbols mark a change, that you're now in a different world. For one thing, lispers do communicate them verbally. Cons, car, coulder, EssExpression. They don't even use "sexp" in code. So it's cons, car and cdr. One advantage is you can compose them, with a small finite mini-language. "cadr", "cdadr". You can chain four a's and d's together to pick out something from a list, as an abbreviation. In practice, you really only see car, cdr and cadr. Synonyms are: first, rest and second. (In fact, there's first...tenth.) But it turns out, it's nice to use words that are visually identifiable as only having to do with list handling, a sort of mechanical part of the code which isn't full of meaning. List-handling is definitely a low-level concept. Also first and rest don't align well, due to having uneven lengths. This is just a little consideration, of course. Outweighing this is how you can have very readable (verbose?) names, like WITH-OPEN-FILE, UNWIND-PROTECT (built-ins) and FROB-FRABULOUSLY and EXIT-UNEXPECTEDLY (fanciful) than anything terse and non-communicative. People aren't typing in car and cdr all the time anyway; it's just common to see them in toy examples because toys tend to be low-level. ---- For example, from XpInCommonLisp: ''The language often involves cryptic names that are far from communicable ("cons", "car", "cdr", "sexp", ...)'' This is a straw man because, first of all, these operators are so fundamental that any lisper does not see them as strange tokens. Secondly, car can also be referred to as ''FIRST'', and cdr as ''REST''. But thirdly, and most importantly, is the implicit assumption that lispers then go on to produce more of this cryptic notation, whereas lisp is in fact one of the most readable (some would say verbose) languages around. Functions in lisp are more likely to be called WITH-OPEN-FILE, UNWIND-PROTECT (built-ins) and FROB-FRABULOUSLY and EXIT-UNEXPECTEDLY (fanciful) than anything terse and non-communicative. -- AnonymousDonor However, CommonLisp still has some names that you can't figure out (eg. progn and zerop). SchemeLanguage, OTOH, has crystal clear default environment. ''Well, no, since it also has CONS, CAR and CDR. But it is more clear than CommonLisp'''''''s; the conventions of using "?" and "!" help considerably.'' ''Things ending in p are predicates, so zerop tests if its argument is zero. I remember this 10 years after my last use of a Lisp with zerop as its test for zero.'' [Oh, my. How very, um...Hungarian.] It's just an idiom. Whenever you write a function in lisp that only can return boolean, it's traditional to end it with the predicate character (p in common lisp, -p in emacs lisp and ? in scheme). How would you name a predicate in your LanguageOfChoice? [[I like the "?" convention, which I believe Scheme got from Microplanner...(integer? x) seems very clearly to be asking a question. And this is not Hungarian notation.]] ''Might as well say Scheme got it from the ternary operator. I think the ultimate source is English.'' Anyway, I still think there are many names that are hard to understand, say progn, ash, rplacd or nconc. You can show me rationales for all of them and I'd love to learn 'em but I'd still think this are bad names. ''There are good examples of bad names. With the ones you listed, I think only progn is important, because people use it often. There's prog1, prog2 and progn. It came from the old days, Fortran/Algol were the rage, and it was the "program feature" because it let code be sequential. As if that's the only way you could write programs. Scheme calls it begin, and maybe you could have begin1 and begin2 instead of prog1 and prog2.'' [maybe it should be begi1, begi2 and begin] ''nconc is used sometimes too, but as an optimization. That's when you hit f1 and pop up the definition. ash is this very low-level math function for 2's complement, and you don't see rplacd much for replacing the cdr of a list.'' ''Lisp is old; true. Scheme in some cases has better naming because it's newer. However, some of it may be faddish; with set!, the ! is there because you need this big punctuation warning that you might alter state. Because Scheme has a strong desire for its coders to use the functional style.'' ''Maybe things like list? are better than listp. (The p stands for "predicate," I guess from back in the 1800s when everyone learned logic.) And alpha-char-p/char-greaterp looks inconsistent, though there's some logic behind that... I'd rather users be allowed to use punctuation and language committees leave it alone, but people will go on either side on this issue. And anyway, in real life you use autocomplete.'' And -p is just a convention. Lisp naming is very flexible; there is nothing stopping you from using ? in Common Lisp if you so choose. ''I don't really think about this; sure some of these low-level names are annoying, but a lot of them are really descriptive too. I realize I'm living in a world which has history; it's annoying at first and you want to pave it over, but then you find it charming and are happy it isn't.'' ---- The problem car and cdr is that they are often misunderstood. People have looked at this many many times, but everything ever suggested as a replacement that I know of was either no improvement or much worse. You don't use them much, but when you do it is extremely useful that they have the same initial and final letters. Treat it as a quirk of the language if you want (they *all* have them), but getting too hung up about them is stupid. They are too useful to get rid of, and have nice semantics for some specific tasks. ---- The other big advantage of the names CAR and CDR is that they're composable. By this I mean that one could write CADR instead of (CAR (CDR ..., CDAR instead of (CDR (CAR, and so on. This helps tremendously when you're trying to write code which accesses data elements out of a cons structure (which is just about all real code.) Sure, the names are funny, but what syntax for composable data member access wouldn't result in funny syntax of one kind or another? ''Pattern matching?'' Heh. Which might be put forward as another LispStrawMen, as pattern-matching macros abound. ''It's true you can do very nice pattern matching in Lisp, and that is an excellent example of the power of macros. However, it is also true that most of the Lisp code one reads (and contributes to) does not use pattern matching. In my opinion the latter point is a big practical difference. CommonLisp is large enough to have a distinct style of its own, even though it is possible to create a completely new style with macros. (I say this as a huge Lisp fan.) -- LukeGorrie'' ---- Quite apart from the danger of starting a HolyWar, I think the title of this page is rather odd. A StrawMan generally means a flimsy argument attributed to your opponents so that you can refute it and make it look as if you've refuted ''them''. Things like "Lisp has incomprehensible function names like CAR and CDR" aren't straw men, they're just not-very-good arguments against Lisp whose appeal rests partly on ignorance about Lisp. That's how it seems to me, anyway; would whoever started this page like to explain why they're "straw men"? -- GarethMcCaughan ''I suppose they're considered straw men put up by lisp detractors... Therefore the point of the page would not be knocking down the straw men, but knocking down those that put up the straw men... or something like that anyway.'' * It could be that ''this page'' is the straw man. No serious criticism of Lisp will be based on rants about "car" and "cdr" and such--but some might like to pretend that this is the case. ---- ''I would recommend a more diplomatic approach, like having a page called LispMisconceptions. * Some think that titles with "straw men" in them suggest a HolyWar.'' * Others think that titles with "LISP" in them suggest a HolyWar * It may be that titles with "HolyWar" in them might result in a solution There are already topics about the pro's and con's (no pun intented) of Lisp. Why yet another? ^---- WantonCrueltyToTheCommonComma ---- '''Strawman:''' Lisp isn't WebStandards based and ExtensibleMarkupLanguage compatible, and can't overpromise as much as modern technologies like VirtualRealityMarkupLanguage. '''Counter:''' AIML: Artificial Intelligence Marketing Language Many people are extremely excited about AIML. But what is it, and how can you use it to spruce up your home page? AIML encapsulates the semantics of revolutionary AI research, much in the same way VRML trivializes the implementation of cutting edge VR research. http://catalog.com/hopkins/text/aiml.html I'm not sure how AIML might be able to replace XML, could you elaborate? Btw, where do sexps provide encodings, namespaces and entities (among other things)? --ArneVogel * Namespaces are provided by colon-delimited identifiers (e.g., (foo:bar) refers to bar in namespace foo). Entities provided courtesy of the LispReader, via #-macros. E.g., #' for taking a reference to a function, or #\ for characters, etc. Encodings, as with all other attributes, can be provided via optional parameters. --SamuelFalvo ---- See: StrawMan ------ CategoryLisp