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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The perils of Lisp in production

69 点作者 fogus大约 13 年前

6 条评论

jwr大约 13 年前
You can write spaghetti code in any language.<p>Whether enforced compile-time strong type checking is a benefit seems to depend on the programmer. It apparently helps some people, it certainly does not help me.<p>For what it's worth, I've been building "production" (is "production" something you make money on? I find this word increasingly vague) systems with both Common Lisp and Clojure for quite some time now. I prefer Clojure. But both languages are lisps. My thoughts so far: you can build spaghetti code in any language. You can either use a language that lets you run your spaghetti quickly, or one that whacks you on the head repeatedly thus making your spaghetti stiffer and straighter. But you end up with spaghetti anyway.<p>I agree that it is difficult to write good lisp code. In my code, I spend a lot of time thinking about contracts and data structures. If I am not careful, I end up with problems later on. But using a language like Java doesn't solve that: you just get the illusion of "better code", because your spaghetti design is now codified into neat factories and patterns.<p>The advantage of using a language from the lisp family is that reworking your spaghetti into something better is much easier, if only because there is so much less code.
评论 #3797317 未加载
评论 #3797251 未加载
评论 #3798881 未加载
评论 #3797254 未加载
brlewis大约 13 年前
If you presume that it's OK to rely on compiler errors rather than attempt to exercise all code paths, then yes, Common Lisp, Scheme, Clojure, JavaScript, PHP, Python, Ruby, Perl, and bash will be more perilous than C, C++, C#, Java, ML and Haskell. (Which of the former group are Lisps?) I disagree with the presumption.
评论 #3798403 未加载
评论 #3797526 未加载
hbbio大约 13 年前
Should I guess (from the domain name) that the link is running on Lisp? I can't get past that!
评论 #3797565 未加载
评论 #3797147 未加载
enduser大约 13 年前
Summary: use SBCL or CMUCL, declare your types, hire good programmers, and don't commit to a deadline without getting a commitment to a specific set of requirements.
lucian1900大约 13 年前
Statically checked types are little more than very broad pre/post conditions on your code. Both CL and Clojure offer such conditionals and both can do it at compile-time if necessary.<p>I don't get it.
评论 #3798616 未加载
评论 #3797758 未加载
评论 #3797421 未加载
peteretep大约 13 年前
I thought the main peril was that the beards of the programmers would get caught on things...
评论 #3797539 未加载
评论 #3797518 未加载