最近Stack Overflow上有一群讨厌perl的人,所以我想我应该把我的“关于你最喜欢的语言你讨厌的五件事”的问题带到Stack Overflow上。拿你最喜欢的语言来说,告诉我你讨厌它的五件事。这些可能只是让你烦恼的事情,承认的设计缺陷,公认的性能问题,或任何其他类别。你只需要讨厌它,它必须是你最喜欢的语言。

不要拿它和其他语言比较,也不要谈论你已经讨厌的语言。不要用你最喜欢的语言谈论你喜欢的事情。我只是想听到你讨厌但能容忍的东西,这样你就可以使用所有其他的东西,我想听到你希望别人使用的语言。

每当有人试图把他们最喜欢的语言强加给我时,我就会问这个问题,有时是面试问题。如果有人找不出他最喜欢的工具的5个缺点,那他对它还不够了解,不能提倡它,也不能利用它赚大钱。他还没有在足够多的不同情况下使用它来充分探索它。他把它作为一种文化或宗教来倡导,这意味着如果我不选择他最喜欢的技术,我就错了。

我不在乎你用什么语言。不想使用特定的语言?那就不要。你通过尽职调查做出了明智的选择,但仍然没有使用它?好吧。有时正确的答案是“你有一个强大的编程团队,有良好的实践和丰富的Bar经验。改成Foo是愚蠢的。”


This is a good question for code reviews too. People who really know a codebase will have all sorts of suggestions for it, and those who don't know it so well have non-specific complaints. I ask things like "If you could start over on this project, what would you do differently?" In this fantasy land, users and programmers get to complain about anything and everything they don't like. "I want a better interface", "I want to separate the model from the view", "I'd use this module instead of this other one", "I'd rename this set of methods", or whatever they really don't like about the current situation. That's how I get a handle on how much a particular developer knows about the codebase. It's also a clue about how much of the programmer's ego is tied up in what he's telling me.

憎恨并不是衡量人们了解多少的唯一尺度,但我发现它是一个相当不错的尺度。他们讨厌的事情也让我知道他们对这个话题的思考有多好。


当前回答

Emacs Lisp

目前还没有足够的商业市场让人们全职用elisp编码 GNU Emacs vs XEmacs不兼容 Scheme中的嵌套函数很整洁,我希望elisp有[1]的概念 用于简单遍历列表的do循环或其他一些工具不是标准的(当然,您现在可以使用lambda进行映射)[1] (function (lambda(…)))[1]应该有一个简写

当然,Lisp的一个美妙之处在于,用一行代码在你自己的代码中修复这些问题并不难。但这并不是与生俱来的,这让我很恼火。

好的问题;我有点不好意思,因为我想不出更好的东西来恨,但说实话,法官大人,没什么好恨的。

其他回答

ColdFusion

大型Flash表单的编译时间。 动态变量类型(有时我讨厌它们) CFScript缺乏特性。 CFTable(永远不能正确显示)。 CFChart中缺少图表类型。 完全缺乏NTLM支持(企业就绪-是的) cfc中的低能变量作用域 没有一个真正的NULL的概念-你的变量只是消失! 没有办法测试某些东西的存在(比如作用域,只是它们内部的成员)

我讨厌所有语言的五件事(至少就我所知):

Does what I say/type, not what I mean Will undoubtedly meet people who think they are experts in the language, but just make a mess of it (e.g. people who insist that removing comments/unused local variables will speed up execution time for a program) Unless the language is obsolete, then it will probably continue to evolve (either the actual language, or the concepts behind using it effectively) requiring you to actively develop with it so as to not fall behind. Can't modify the lexer/compiler (add in own context sensitive grammar) No perfect language (every language is missing some sort of useful feature that usually is either impossible to simulate, will unavoidable have an ugly interface or just require far too much time to implement and get it right)

EL -表达式语言,${…}和#{…JSF 2.0 Facelets用于从底层Java代码中提取数据。

All the fun things, like method calls with parameters and annotation based naming is only present in the EL in Java EE 6 which is only available in Glassfish v3. It is a royal pain to 1) get the right jars for an earlier Servlet 2.5 container, and 2) getting them to work without interfering with any previous implementation available in the container. Having only an earlier version of JSF like 1.2, takes away the method calls and leave you to work with f:setPropertyActionListener - http://weblogs.java.net/blog/2009/07/22/say-sayonara-spal - which, trust me on this, is not very nice. The EL parser has no idea of where the snippet it is to parse and interpret came from, so you tend to give everything an id so you at least can identify which tag made it grumpy. Eclipse gives a warning at every EL method call as it is JSF 1.2. only too.

Java -不支持语言级别的组合

Python:

You usually have the entry point of the program at the end of the file. (Because if it calls any function defined in the module, it has to occur after those functions in the sources.) I hate it when you have to spend time looking for the entry point of a program, so I always have a simple main.py file with: def main(): ... if __name__ == '__main__': main() When an exception is raised, it can only be catched by the main thread. Or something like that. Destructors are quite useless, because when written in Python they may break garbage collection IIRC. I've never figured out how relative imports work in Python 2. I'd like to see more collections in the standard library. For example: linked lists, thread-safe collections, ...