3 ms·
You aren't telling me anything I don't already know. > Lisp [...] indentation styles. They make code more readable and writable. This is a matter of opinion,
by xscott 4y ago
You aren't telling me anything I don't already know.
> Lisp [...] indentation styles. They make code more readable and writable.
This is a matter of opinion, and you're free to ignore the majority or programmers who don't like Lisp. Trust me though: there are a lot of smart programmers who reject Lisp, and it's not because they "just haven't learned to ride a bike" yet.
My only question is whether the people who don't like Lisp dislike it because of parens (which is the conventional wisdom) or because of the arbitrary indentation and closing brace style.
- kazinator 4y ago> This is a matter of opinion But, it turns out, it basically isn't. In the Lisp world there is a tremendous consensus about it; nearly everyone does it in nearly an identical way to everyone else. This is in stark contrast to the way, say, C or C++ people lock horns over formatting. Even if you might not like the particular way it is done, the dogged consistency has to count for something. > arbitrary indentation and closing brace style. Lispm demonstrated how this style is reproduced by a Lisp system's printer. It's codified into a documented algorithm, and one that isn't hugely complicated.
- xscott 4y ago> But, it turns out, it basically isn't. In the Lisp world there is a tremendous consensus about it; nearly everyone does it in nearly an identical way to everyone else. Yes, and that's self selecting. If someone hates that style, that might be one reason they don't stick around in the Lisp world. Besides, something being a consensus has little to say about whether it's an opinion or not. > Even if you might not like the particular way it is done, the dogged consistency has to count for something. Lol, no! Just like consensus, consistency isn't a virtue on its own. You could be consistently doing it wrong. :-)
- lispm 4y ago>Yes, and that's self selecting. No, people could just use their style. We've seen that in some subgroups. Often for example with AutoCAD users scripting in AutoLisp / VisualLisp. > consistency isn't a virtue on its own. You could be consistently doing it wrong. :-) Consistency is a virtue on its own. Consistent coding standards improve readability for a wider group, even if the coding standard would be slightly less optimal according to some other metrics.
- xscott 4y agoHelping people cooperate is a virtue. You're confusing the means with the ends, and it's very likely that the OP I first responded to above does not find the Lisp-consistent style very readable, so it didn't enable his cooperation. They made a point of saying, "I can look at blurry C code and know generally what things are and what’s going on without a single character being legible." That sure seems like their problem with Lisp is layout/formatting.
- kazinator 4y ago> Helping people cooperate is a virtue. Oh, is that what you're doing?
- lispm 4y ago> it's very likely that the OP I first responded to above does not find the Lisp-consistent style very readable, so it didn't enable his cooperation. I can't find that in his post.
- xscott 4y agoHe wrote: "I can look at blurry C code and know generally what things are and what’s going on without a single character being legible. Lisps don’t typically have the same convenience"
- lispm 4y ago> Trust me though: there are a lot of smart programmers who reject Lisp, and it's not because they "just haven't learned to ride a bike" yet. You aren't telling me anything I don't already know - to quote your remark from above. The questions of code formatting and Lisp syntax has been discussed since the early 1960s. I've taking part in such discussions myself since the mid 80s. My take: people don't like Lisp or reject Lisp because of MANY different factors - and many are justified, based on what they are looking for - not everybody needs to like or use Lisp - if there are better programming languages with their eco-systems for many programmers, that's totally fine for me. Syntax is a factor why people don't program in Lisp. The standard formatting rules are a minor factor. More important is that the syntax&semantics is difficult: the consequences of code as data is confusing them - for example they have to deal with quoting/evaluation rules, they see that there are macro expansion phases which make code understanding and debugging harder, etc. > ... because of the arbitrary indentation and closing brace style. Lisp does not have an 'arbitrary' indentation and closing brace style. There are clear rules and these are supported by tools in various ways.
- xscott 4y ago> discussed since the early 1960s. I've taking part in such discussions myself since the mid 80s. You have me beat, if being older is winning. But I was lurking on comp.lang.lisp before web browsers were a thing too... > Lisp does not have an 'arbitrary' indentation and closing brace style. Heh, that word seems to bother both you and kazinator. I didn't mean it as an insult. :-)
- lispm 4y ago'being older is not a virtue in itself' (using one of your phrases), more interesting would be the experience of actually seeing people and helping them trying to learn Lisp in different settings. For example: at the local university we had several hundred students each year who had to learn Lisp and/or Scheme (and other programming language) as part of their extensive computer science introductory courses - most students had no prior knowledge of Lisp. That was at a time when we used printer terminals or vt terminals to edit code. Later one could see students who could do programming homework on their personal computers or with UNIX workstations at the University...