如果我非常喜欢 Ruby,是否有理由让我现在应该学习另一种语言,例如 Lua 或 Erlang?
如果我非常喜欢 Ruby,是否有理由让我现在应该学习另一种语言,例如 Lua 或 Erlang?
if i like Ruby a lot, is there a reason I should learn another language now, such as Lua or Erlang?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
新的编程语言,就像口语一样,可以开辟新的视角。 学习新语言——尤其是那些与你习惯的语言截然不同的语言(Erlang 可能符合这个要求)——可以教你很多你甚至不知道的不同东西。不懂编程。 所以是的,我认为你绝对应该这样做,即使你只是学到了足够的知识来修补它并感受新语言。
New programming languages, much like spoken languages, can open up new perspectives. Learning new languages -- especially ones rather different from what you're used to (and Erlang will probably fit that bill) -- can teach you a lot of different things you didn't even know you didn't know about programming. So yes, I think you absolutely should, even if you just learn enough to tinker with it and get a feel for the new language.
学习函数式语言尤其是非常有益的。 熟悉函数式编程风格是成为更好程序员的必经之路。 Lisp(或其衍生物)尤其是一种很好的学习语言。 以下是关于 SO 的过去的线程列表,可能会为您提供一些见解
Learning a functional language in particular can be extremely beneficial. Becoming familiar with the functional style of programming is a surefire step toward becoming a better programmer. Lisp (or its derivatives) in particular is a good language to study. Here's a list of past thread on SO that might offer you some insight along these lines:
抛开想要学习另一种语言的(极好的)一般原因,如果您非常喜欢 Ruby,您可能想
学习 Smalltalk,这是一种与 Ruby 非常非常相似的语言,但形式更纯粹。
学习一门非常非常不同的语言 - 比如说基于代数数据类型和函数而不是对象和方法的语言,以及使用静态类型系统而不是动态类型系统的语言 - 但像 Ruby 这样的语言,将支持强大的程序组合和通用编程方法。 好的候选者包括标准机器学习和 Haskell。
学习一门非常非常不同的语言——说一些让你控制内存中的每一位、地址和单词的语言——一些迫使你理解和控制硬件的语言。 换句话说,学习 C。
关于你提到的其他语言,
Lua 很小,而且设计和实现非常优雅。 这可能会吸引您内心的红宝石爱好者。 但与 Ruby 不同的是,它并没有强加太多的世界观; 它更多的是零件的集合。 我建议您先使用三四种其他语言之后,才更有可能欣赏和享受 Lua。
Erlang 很有趣,但我有一种直觉,它要么太不同(纯函数式、分布式),要么不够不同(动态类型系统)。 但如果它对你有吸引力,那就去吧。
Leaving aside the (excellent) general reasons to want to learn another language, if you like Ruby a lot you might want to
Learn Smalltalk, which is a language very, very similar to Ruby but in purer form.
Learn a language that is very, very different—say something that is based on algebraic data types and functions rather than objects and methods, and something with a static type system rather than a dynamic type system—but something that, like Ruby, will support powerful methods of program composition and generic programming. Good candidates would include Standard ML and Haskell.
Learn a language that is very, very different—say something that makes you control every bit, address, and word in memory—something that forces you to understand and take control of the hardware. In other words, learn C.
Regarding the other languages you mention,
Lua is small and very elegantly designed and implemented. That may appeal to the Rubyist in you. But unlike Ruby it does not impose much of a worldview; it is more of a collection of piece parts. I would suggest you're more likely to appreciate and enjoy Lua after you've worked in three or four other languages first.
Erlang is interesting, but I have a gut feel it's either too different (purely functional, distributed) or not different enough (dynamic type system). But if it appeals to you, go for it.
另一方面,真正了解一门语言是有道理的。 与掌握一打语言的表面知识相比,深入了解一种语言可以做更多的事情。
On the other hand, there's something to be said for really knowing a language well. You'll be able to do a lot more with in-depth knowledge of a single language than you will with surface knowledge of a dozen.
如果您非常喜欢 Ruby,那么您绝对应该学习另一种语言...没有 sigils 如果可能的话。
If you like Ruby a lot you should definitely learn another language... one without sigils if possible.
在我看来,专业人士学习他需要使用的工具。 框架、容器、语言,都是公平的游戏。 我从 Pascal 开始,转向 C,然后是 C++。 然后转换成Java。 如今,它主要是 Java,还有大量 Javascript 和一些 PHP。 够简单吧? 嗯,我还需要学习 Bash 脚本和 Perl。 别介意我需要处理的所有其他废话(如果你说你了解所有网络身份验证,我会称你为骗子)。 那里有很多东西。 加入进来。愿意尝试不同的事情。
Seems to me that a professional learns the tools he needs to use. Frameworks, containers, languages, all are fair game. I started out in Pascal, went to C and then C++. Then converted to Java. These days its mostly Java with a lot of Javascript and some PHP. Easy enough right? Well, I also need to learn Bash scripting and Perl. Never mind all the other crap I need to get on top of (if you say you understand all of web authentication I will call you a liar). There's a lot of stuff out there. Jump in. Be willing to try different things.
我总是喜欢学习新语言,因为它只是为了挑战。 它让我的大脑保持健康。 我还发现,能够说“我很灵活。我能适应你未来的任何需求。我可以用我的一长串语言来证明这一点”,这可以成为良好的工作面试素材。
I always enjoy learning new languages for the mere challenge of it. It keeps my brain fit. I've also found it makes for good job interview fodder to be able to say "I'm flexible. I'm adaptable to whatever your needs may be in the future. And I can prove it with my long list of languages."
我的主要语言是 PHP。 我是一个脚本语言爱好者,但我还是深入研究了 C#、Java、Python、Ruby 甚至 OO JavaScript 书籍来寻找新的机制、思维方式。 例如,我在 Java 中发现了很多特技,我可以在我的整天工作中实现它们。 因此,学习或仅仅学习新语言可以拓宽你的视野。
My main language is PHP. I am a script language fan, nevertheless I have dived into C#, Java, Python, Ruby and even OO JavaScript books to find new mechanisms, ways of thinking. I have found pretty many stunts in Java for example, that I could implement in my all day work. So learning or just studying new languages can widen your perspective.