TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why I Program in Lisp

286 点作者 ska80大约 1 个月前

20 条评论

discmonkey大约 1 个月前
Good article. Funnily enough the throw away line &quot;I don&#x27;t see parentheses anymore&quot;. Is my greatest deterrent with lisp. It&#x27;s not the parens persay, it&#x27;s the fact that I&#x27;m used to reading up to down and left to right. Lisp without something like the clojure macro -&gt;, means that I am reading from right to left, bottom to top - from inside out.<p>If i programmed enough in lisp I think my brain would adjust to this, but it&#x27;s almost like I can&#x27;t full appreciate the language because it reads in the &quot;wrong order&quot;.
评论 #43655509 未加载
评论 #43655829 未加载
评论 #43660124 未加载
评论 #43660376 未加载
评论 #43657696 未加载
评论 #43664571 未加载
评论 #43668223 未加载
评论 #43660907 未加载
评论 #43655570 未加载
评论 #43659522 未加载
lukaslalinsky大约 1 个月前
Whenever I hear someone talking about purely functional programming, no side effects, I wonder what kind of programs they are writing. Pretty much anything I&#x27;ve written over the last 30 years, the main purpose was to do I&#x2F;O, it doesn&#x27;t matter whether it&#x27;s disk, network, or display. And that&#x27;s where the most complications come from, these devices you are communicating with have quirks that need you need to deal with. Purely functional programming is very nice in theory, but how far can you actually get away with it?
评论 #43653471 未加载
评论 #43652861 未加载
评论 #43652782 未加载
评论 #43653371 未加载
评论 #43652619 未加载
评论 #43652616 未加载
评论 #43652745 未加载
评论 #43653996 未加载
评论 #43652884 未加载
评论 #43654199 未加载
评论 #43656312 未加载
评论 #43653760 未加载
评论 #43652982 未加载
评论 #43652809 未加载
评论 #43652871 未加载
评论 #43654023 未加载
评论 #43658360 未加载
评论 #43653148 未加载
评论 #43652766 未加载
评论 #43653848 未加载
评论 #43656390 未加载
评论 #43653175 未加载
DadBase大约 1 个月前
Had a PalmPilot taped to a modem that did our auth. Lisp made the glue code feel like play. No types barking, no ceremony—just `(lambda (x) (tinker x))`. We didn’t debug, we conversed. Swapped thoughts with the REPL like it was an old friend.
评论 #43654208 未加载
评论 #43655802 未加载
评论 #43654485 未加载
shadowgovt大约 1 个月前
The most impressive thing, to me, about LISP is how the very, very small distance between the abstract syntax tree and the textual representation of the program allows for some very powerful extensions to the language with relatively little change.<p>Take default values for function arguments. In most languages, that&#x27;s a careful consideration of the nuances of the parser, how the various symbols nest and prioritize, whether a given symbol might have been co-opted for another purpose... In LISP, it&#x27;s &quot;You know how you can have a list of symbols that are the arguments for the function? Some of those symbols can be lists now, and if they are, the first element is the symbolic argument name and the second element is a default value.&quot;
bgitarts大约 1 个月前
Always read from experienced developers praising lisps, but why is it so rare in production applications?
评论 #43658131 未加载
评论 #43655744 未加载
评论 #43660344 未加载
评论 #43659217 未加载
评论 #43661246 未加载
评论 #43659090 未加载
p0w3n3d大约 1 个月前
Terry Pratchett&#x27;s quote in one of his books (in fact I think this is a running gag, and appeared in multiple books):<p><pre><code> Five exclamation marks, a sure sign of an insane mind </code></pre> That&#x27;s what I think about five closing parentheses too... But tbh I am also jealous, because I can&#x27;t program in lisp at all
djha-skin大约 1 个月前
I agree with some statements OP makes but not others. Ultimately, I write in lisp because it&#x27;s fun to write in Lisp due to its expressive power, ease of refactoring, and the Lisp Discord[1].<p>&gt; Lisp is easier to remember,<p>I don&#x27;t feel this way. I&#x27;m always consulting the HyperSpec or googling the function names. It&#x27;s the same as any other dynamically typed language, such as Python, this way to me.<p>&gt; has fewer limitations and hoops you have to jump through,<p>Lisp as a language has incredibly powerful features find nowhere else, but there are plenty of hoops. The CLOS truly feels like a superpower. That said, there is a huge dearth of libraries. So in that sense, there&#x27;s usually <i>lots </i> of hoops to jump through to write an app. It&#x27;s just I like jumping through them because I like writing code as a hobby. So fewer limitations, more hoops (supporting libraries I feel the need to write).<p>&gt; has lower “friction” between my thoughts and my program,<p>Unfortunately I often think in Python or Bash because those are my day job languages, so there&#x27;s often friction between how I think and what I need to write. Also AI is allegedly bad at lisp due to reduced training corpus. Copilot works, sorta.<p>&gt; is easily customizable,<p>Yup, that&#x27;s its defining feature. Easy to add to the language with macros. This can be very bad, but also very good, depending on its use. It can be very worth it both to implementer and user to add to the language as part of a library if documented well and done right, or it can make code hard to read or use. It must be used with care.<p>&gt; and, frankly, more fun.<p>This is the true reason I actually use Lisp. I don&#x27;t know why. I think it&#x27;s because it&#x27;s really fun to write it. There are no limitations. It&#x27;s super expressive. The article goes into the substitution principle, and this makes it easy to refactor. It just feels good having a REPL that makes it easy to try new ideas and a syntax that makes refactoring a piece of cake. The Lisp Discord[1] has some of the best programmers on the planet in it, all easy to talk to, with many channels spanning a wide range of programming interests. It just feels good to do lisp.<p>1: <a href="https:&#x2F;&#x2F;discord.gg&#x2F;HsxkkvQ" rel="nofollow">https:&#x2F;&#x2F;discord.gg&#x2F;HsxkkvQ</a>
jll29大约 1 个月前
As much as I sympathize with this post and similar ones, and as much I personally like functional thinking, LISP environments are not nearly as advanced anymore as they used to be.<p>Which Common LISP or Scheme environment (that runs on, say Ubuntu Linux on a typical machine from today) gets even close to the past&#x27;s LISP machines, for example? And which could compete with IntelliJ IDEA or PyCharm or Microsoft Code?<p><a href="https:&#x2F;&#x2F;ssw.jku.at&#x2F;General&#x2F;Staff&#x2F;PF&#x2F;genera-screenshots.html" rel="nofollow">https:&#x2F;&#x2F;ssw.jku.at&#x2F;General&#x2F;Staff&#x2F;PF&#x2F;genera-screenshots.html</a>
评论 #43659481 未加载
评论 #43659811 未加载
efitz大约 1 个月前
This is the first article I’ve ever read that made me want to go learn Lisp.
评论 #43652660 未加载
评论 #43652951 未加载
评论 #43654395 未加载
评论 #43655194 未加载
smckk大约 1 个月前
Could a not-too trivial example like the difference between a Java sudoko solver and a lisp version with all the bells and whistles of FP such as functions as data and return values, recursion and macros be used to illustrate the benefits?
评论 #43661806 未加载
terminalbraid大约 1 个月前
&gt; Other general purpose languages are more popular and ultimately can do everything that Lisp can (if Church and Turing are correct).<p>I find these types of comments extremely odd and I very much support lisp and lisp-likes (I&#x27;m a particular fan of clojure). I can only see adding the parenthetical qualifier as a strange bias of throwing some kind of doubt into other languages which is unwarranted considering lisp at its base is usually implemented in those &quot;other general purpose languages&quot;.<p>If you can implement lisp in a particular language then that particular language can de facto do (at least!) everything lisp can do.
评论 #43653031 未加载
评论 #43652814 未加载
评论 #43652652 未加载
评论 #43653610 未加载
评论 #43653854 未加载
评论 #43659243 未加载
评论 #43652890 未加载
0xTJ大约 1 个月前
I&#x27;ve never programmed in a Lisp, but I&#x27;d love to learn, it feels like one of those languages like Perl that are just good to know. I do have a job where getting better with SKILL would be useful.
dramm大约 1 个月前
Surely one of the the main reason to program in Lisp (and Haskell, and ???) is so you can write blog posts about doing so :-)<p>(I do really like Lisp).
submeta大约 1 个月前
&gt; Lisp&#x27;s dreaded Cambridge Polish notation is uniform and universal. I don&#x27;t have to remember whether a form takes curly braces or square brackets or what the operator precedency is or some weird punctuated syntax that was invented for no good reason. It is (operator operands ...) for everything. Nothing to remember. I basically stopped noticing the parenthesis 40 years ago. I can indent how I please.<p>Well, that might be true for Scheme, but not for CL. There are endless forms for loops. I will never remember all of them. Or even a fraction of it. Going through Guy Steel’s CL book, I tend to think that I have a hard time remembering most of the forms, functions, and their signatures.
fithisux27 天前
&quot;Why I Program in Lisp&quot;<p>because you don&#x27;t have money to waste on doctors?
revskill大约 1 个月前
Programming is about coordination between tasks. Prove me wrong.
评论 #43653079 未加载
评论 #43655208 未加载
DeathArrow大约 1 个月前
&gt;It&#x27;s less of a big deal these days, but properly working lambda expressions were only available in Lisp until recently.<p>I think Haskell and ML had lambda expressions since like 1990.
评论 #43652599 未加载
评论 #43652770 未加载
damnitbuilds大约 1 个月前
&quot;properly working lambda expressions were only available in Lisp until recently.&quot;<p>until -&gt; since
评论 #43652694 未加载
评论 #43653064 未加载
zoky大约 1 个月前
I’m not really familiar with Lisp, but from glancing at this article it seems like all of these are really good arguments for programming in Ruby (my language of choice). Easily predictable syntax, simple substitution between variables and method calls, dynamic typing that provides ad hoc polymorphism… these are all prominent features of Ruby that are much clunkier in Python, JavaScript, or really any other commonly used language that I can think of.<p>Lisp is on my list of languages to learn someday, but I’ve already tried to pick up Haskell, and while I did enjoy it and have nothing but respect for the language, I ultimately abandoned it because it was just too time-consuming for me to use on a day-to-day basis. Although I definitely got something out of learning to program in a purely functional language, and in fact feel like learning Haskell made me a much better Ruby programmer.
评论 #43653151 未加载
评论 #43653085 未加载
评论 #43653823 未加载
i_love_retros大约 1 个月前
Given that code is mostly written by LLMs now (or will be soon) isn&#x27;t it better to just use the best language that fits these requirements:<p>- LLM well trained on it. - Easy for human team to review. - Meets performance requirements.<p>Prob not lisp?
评论 #43654271 未加载
评论 #43654572 未加载
评论 #43654261 未加载