4 ms·
> How can you be disliking it from a practical point of view if you don't use it in practice? I had plenty of exposure to deeply nested things. This is pretty
by ahoge 11y ago
> How can you be disliking it from a practical point of view if you don't use it in practice?
I had plenty of exposure to deeply nested things. This is pretty much like nested function calls. "foo(a, b)" and "(foo a b)" isn't all that different, is it?
I prefer to have different bits of syntax for different things because it looks less uniform. I like it when different things stick out in different ways.
> Also, take a look at APL or J if you want to see "unreadable" language.
Both of these aren't even in the top 50. Can you think of a somewhat popular (non-legacy) language?
- klibertp 11y ago> I had plenty of exposures to deeply nested things. This is pretty much like nested function calls. I have no idea what you mean here. > I like it when different things stick out in different ways. Here's your problem: the "things" are sticking out in a variety of ways in Lisps, you just don't know and can't recognize in what ways exactly. > Both of these aren't even in the top 50. Can you think of a somewhat popular (non-legacy) language? Again, I don't understand what you mean.
- TeMPOraL 11y agoI think this requires an obligatory image explanation for non-lispers: http://www.loper-os.org/wp-content/parphobia.png http://www.loper-os.org/wp-content/parphobia.png
- ahoge 11y ago> I have no idea what you mean here. Nested lists are similar to nested function calls. Did you skip the rest of the paragraph? > the "things" are sticking out in a variety of ways No, they don't. Syntax-wise, everything is the same. "Scheme's very simple syntax is based on s-expressions, parenthesized lists in which a prefix operator is followed by its arguments. Scheme programs thus consist of sequences of nested lists." There shall be nested lists. That's all, folks! In other languages, you have syntax for importing stuff, syntax for declaring a variable, syntax for different loop constructs, syntax for branching, syntax for classes/methods/functions... Each building block comes with its own syntax. This isn't as elegant as having one universal construct for everything, but it's easier to use (once you got used to it), because the syntax itself carries a lot of the information. (define (square x) (* x x)) I rather write something like: square(x) => x * x; "bla(...)" is a bit of syntax for defining a function. "=>" is a bit of syntax for defining a lambda. "x * x" is a bit of syntax for using x's "star" operator. > Again, I don't understand what you mean. J and APL aren't popular languages. There are many unpopular languages with worse syntax. They are also both array programming languages which is a rather odd niche.
- TeMPOraL 11y agoThis is simply the case of getting used to something. The Lisp code reads like this: (define A B) -> define A to be B. You define (square x) to mean (* x x). It requires you to know only one syntax rule - that (f a b ...) means "apply f to arguments a, b, ...". The above code basically reads "define applying square to x to mean applying * to x and x". > They are also both array programming languages which is a rather odd niche. Array programming may seem like an odd niche if the only thing one knows is web development, but the moment you actually start doing some maths, they become incredibly useful. Another, much more popular (and crappier, which seems to be a common correlation, but that's a different story) array programming language is MATLAB. Also you've probably heard of R, loved in statistics and sciences, which is another array language.
- ahoge 11y ago> This is simply the case of getting used to something. My point was that other languages provide more visual hooks. Lisp is just words and parens. Nothing sticks out. Everything is the same. So, you can't learn this "visual vocabulary" because there simply isn't any. There is a thing at the beginning of each list and what follows are the parameters. That's it. "(define x 5)", "(square x)", and "(+ x x)" are syntactically the same thing. > Array programming may seem like an odd niche if the only thing one knows is web development You make it sound like it's either web stuff or maths. Array programming languages aren't used for scripting (e.g. games), are they?
- TeMPOraL 11y agoHow many of those visual hooks are provided by syntax highlighting? You have that in Lisp as well. Moreover, you don't need that many syntax hooks; you learn to recognize words, just like when reading a book, and also indentation structure. > Array programming languages aren't used for scripting (e.g. games), are they? They've been used at least once, if you count one demo and one game I wrote in MATLAB. Man, you wouldn't believe how convenient array languages are when you need to do, things like polygon mesh interpolation (morphing), not to mention actual array operations like multiplying matrices or vectors. MATLAB may be a crappy language, but the array operations? I wish I had them in C++/Java for games.