Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




> 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.


This 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.


> 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?


How 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.


If you interpret "array programming language" as "language with support for arrays and matrices as first-class objects with nice operators, etc" then you get a lot more things coming into the mix beyond oddballs like apl.


> but it's easier to use (once you got used to it)

No, actually it's easier to both read and write and edit sexps once you get used to it. This whole thread is about this: you have no practical Lisp experience yet you claim Lisp is not practical. You couldn't be bothered to actually learn more of a language, but you want to tell us how the experience of using it looks like.

It doesn't work that way. You can only compare things meaningfully when you have comparable knowledge of both. You apparently don't. There are many people who do know both "normal" languages and Lisps and most of them seem to agree that in practice Lisps are as readable as other syntaxes. But you don't want to believe in it for some reason and you don't even want to see for yourself.

> square(x) => x * x;

Why don't you answer my earlier posts, where I show how to make similar syntax in Lisp?

> J and APL aren't popular languages.

But that is completely irrelevant. I'm talking about language features and practice/experience of programming with it, I don't care at all about "popularity".


> You can only compare things meaningfully when you have comparable knowledge of both.

Lisp isn't the only language which allows you to nest things.

You can nest function calls, lists, objects, tuples, and whatever in any language.

  (a b (c d))

  a(b, c(d))
Impossible to imagine, eh?

> Why don't you answer my earlier posts, where I show how to make similar syntax in Lisp?

So, your solution to make Lisp usable is also to not write Lisp? And I'm supposed to take that as disagreement?

If you extend it with your own syntax, it becomes a different language.


> If you extend it with your own syntax, it becomes a different language.

...but that's exactly what programming Lisp looks like. Becoming a different language every time you need it to is business as usual in Lisp. Syntactic abstraction - ability to extend language syntax - is central to Lisp programming.


> If you extend it with your own syntax, it becomes a different language.

No. This is exactly what Lisp is for. If you're not transforming it into hundreds of small DSLs (with their own syntax and a wide variety of semantic properties), then you're not using it right, and missing on all of its expressive power. In such case, yes, you may get rightfully puzzled, what all the Lisp buzz is about if it's just all the same stuff, but with an ugly syntax.


I think this requires an obligatory image explanation for non-lispers: http://www.loper-os.org/wp-content/parphobia.png




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: