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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why Perl 6 Scares The Hell Out Of Me

12 点作者 antiform将近 17 年前

5 条评论

gcv将近 17 年前
I'm not much of a Perl guy (in the past, I used Perl 5 for one-off tasks), and I don't know much about Perl 6, so I don't understand some of the author's finer technical points. I do want to address his point about the "personal language anti-pattern" and how it comes up in Lisp.<p>It could be that I haven't read enough old Lisp code, but I have never yet seen this problem. Not once. Lispers use macros all the time to extend the language, but the practice has well-established conventions, and every time I see macros at play, they make the code more terse, and therefore much easier to read. Three typical examples. (1) New with- blocks, such as (with-datastore-connection ...), which abstract away recovery boilerplate. (2) New defclass macros, which provide CLOS classes with special functionality (maybe define-persistent-class). (3) New defun macros which define functions with special behavior (maybe define-memoized-function).<p>Of course macros in the wrong hands are dangerous. A macro called with-open-socket should open and clean up sockets, and if it actually opens a file instead, then the person who wrote it made a horrible blunder. However, this same person will probably do a lot of damage using any tools provided by any language, no matter how restrictive.<p>I have a feeling that a lot of this "personal language anti-pattern" FUD, which I've seen before, comes from being burned by bad developers wielding C++ and overusing operator overloading. C++ is probably not a useful template for where language programmability leads to disastrous code, because C++ itself has poorly thought-out and confusingly overloaded operators and syntax. Example: I just love that &#60;&#60; and &#62;&#62; are both for bit shifting and stream operations, which brilliantly conflicts with nested templates like list&#60;list&#60;int&#62;&#62;, which must be written as list&#60;list&#60;int&#62; &#62;, note the trailing space.
评论 #207496 未加载
jrockway将近 17 年前
This doesn't scare me. What scares me are tools like PPI. I don't want tools touching my source code. I want a language that makes those tools unnecessary. (Lisp and Perl6 qualify. I don't need my editor to type code for me; I can write language constructs that eliminate that need. Actually, I can do this rather effectively in Perl 5, too.)
scott_s将近 17 年前
What the author sees as a weakness is what many people here see as a strength: tailoring the language to the application.<p>I don't think I know enough to agree or disagree with the author, but I'm curious to see what people here have to say.
评论 #207848 未加载
dejb将近 17 年前
I'm not sure which to be more scared of - perl 6 or the death of our sun.
评论 #207516 未加载
gaius将近 17 年前
I am as scared of Perl 6 as I am of the Loch Ness Monster, Bigfoot, and other things that don´t exist...