学什么? Lisp或OCaml还是......?

时间:2022-09-11 09:22:23

I already have a few languages under my belt (in a rough order of expertise): Python, C, C++, PHP, Javascript, Haskell, Java, MIPS, x86 assembler. But it's been almost 2 years since I learned a new one, and I'm starting to get the itch. I have a few criteria:

我已经掌握了一些语言(粗略的专业知识):Python,C,C ++,PHP,Javascript,Haskell,Java,MIPS,x86汇编程序。但是,自从我学会了一个新的,已经差不多2年了,我开始痒了。我有几个标准:

  1. Must (repeat: must) have a free Linux implementation
  2. 必须(重复:必须)有一个免费的Linux实现

  3. Should be different from the languages I already know. In other words, it should have features that get me thinking about solving problems in a new way.
  4. 应该与我已经知道的语言不同。换句话说,它应具有让我思考以新方式解决问题的功能。

  5. Should have some potential for practical use. It doesn't need to be the next Java, but this rules out Brainf* and Shakespeare :) I don't really care how many job postings does it have, but real-world apps and libraries are a plus.
  6. 应该有一些实际应用的潜力。它不需要是下一个Java,但这排除了Brainf *和莎士比亚:)我真的不关心它有多少招聘帖子,但真实世界的应用程序和库是一个加号。

  7. Should have at least just enough free learning materials to get me started in it.
  8. 应该至少有足够的免费学习材料来帮助我入门。

I was thinking Lisp (CL? something else?) or OCaml. I already have some experience with functional languages with Haskell (yes I know that Lisp/OCaml are multi-paradigm). I'm not an expert - e.g. parts of code from Real World Haskell can still contort my brain, but I understand the basic concepts and some advanced ones (functors, monads).

我在想Lisp(CL?还有什么?)或OCaml。我已经有了一些使用Haskell的函数式语言的经验(是的,我知道Lisp / OCaml是多范式的)。我不是专家 - 例如来自Real World Haskell的部分代码仍然可以扭曲我的大脑,但我理解基本概念和一些高级概念(仿函数,monad)。

Which one to choose? Any other languages that I have overlooked? Also, could you please include some useful links to good books/tutorials etc.

哪一个选择?我忽略了其他任何语言?另外,您能不能包括一些有用的链接到好书/教程等。

16 个解决方案

#1


Neither Lisp nor OCaml is super far afield from what you already know. Here are four suggestions chosen partly for intrinsic interest and partly to stretch your horizons.

Lisp和OCaml都不是你所知道的超级远方。这里有四个建议,部分是为了内在的兴趣,部分是为了扩展你的视野。

  • A logic programming language, probably Prolog. I haven't found good materials online, but the book The Art of Prolog by Sterling and Shapiro is excellent. The more basic textbook by Clocksin and Mellish is also good. The main point of interest is programming with relations, not functions.

    一种逻辑编程语言,可能是Prolog。我没有在网上找到好的资料,但是Sterling和Shapiro的“Prolog的艺术”一书非常出色。 Clocksin和Mellish的基础教科书也很好。主要的兴趣点是用关系编程而不是函数。

  • A pure object-oriented language, either Smalltalk or Self. If you've only used hybrid object-oriented languages you'll be amazed how beautiful pure object-orientation can be. I've linked to the Squeak implementation of Smalltalk. I personally would recommend learning Smalltalk before tackling Self; there's a very large and active community and the software is well developed. Self stands on Smalltalk's shoulders and is an even more inspiring design, but the community is much smaller. For those who have access to the ACM Digital library I recommend the excellent talk by Dave Ungar at HOPL-III; the paper is also pretty good.

    纯粹的面向对象语言,Smalltalk或Self。如果您只使用混合面向对象语言,您会惊奇地发现纯粹的面向对象是多么美丽。我已经链接到了Smalltalk的Squeak实现。我个人会建议在处理Self之前学习Smalltalk;这是一个非常庞大和活跃的社区,软件也很发达。 Self站在Smalltalk的肩膀上,是一个更具启发性的设计,但社区规模要小得多。对于那些可以访问ACM数字图书馆的人,我推荐Dave Ungar在HOPL-III上的精彩演讲;这篇论文也很不错。

  • The Icon programming language has two great things going for it; a powerful and unusual evaluation model with implicit backtracking, and a user-extensible model of string processing that beats regular expressions all hollow. I'm sorry to say that Icon has never quite kept pace with the times, and of all my recommendations it is the least practical. In fact I fear the language is moribund. But it will stretch your mind almost as much as Haskell, and in wildly different directions. Icon is still very useful for string-processing tasks of modest size.

    Icon编程语言有两件好事;一个功能强大且不同寻常的评估模型,带有隐式回溯,以及一个用户可扩展的字符串处理模型,可以将正则表达式全部空洞化。我很遗憾地说Icon从来没有跟上时代的步伐,而且我的所有建议都是最不实用的。事实上,我担心语言会奄奄一息。但它会让你的思绪几乎和Haskell一样,并且在不同的方向上。 Icon对于适度大小的字符串处理任务仍然非常有用。

    You can read about Icon string processing in an article by Ralph Griswold from Computer Journal.

    您可以在计算机杂志的Ralph Griswold撰写的文章中阅读有关图标字符串处理的内容。

  • The Lua programming language is my last and least radical suggestion. Its interest is not so much in novel language features or paradigms but in the superb engineering of the language and its implementation. Lua occupies a number of niches, including scripting, gaming, string processing, and lightweight functional programming. But its main point of interest is its seamless integration with C, and to get the full benefit, you should bind a C library into Lua.

    Lua编程语言是我最后也是最不激进的建议。它的兴趣不在于新颖的语言特征或范例,而在于语言及其实现的精湛工程。 Lua占据了许多领域,包括脚本,游戏,字符串处理和轻量级函数式编程。但它的主要兴趣点是它与C的无缝集成,为了获得全部好处,你应该将一个C库绑定到Lua。

    The HOPL-III web site also contains an excellent talk and paper about Lua.

    HOPL-III网站上还有一篇关于Lua的优秀演讲和论文。

#2


Both Common Lisp and Ocaml are certainly useful to learn. If you already know Haskell, CL might be the more different experience.

Common Lisp和Ocaml都非常有用。如果您已经了解Haskell,那么CL可能是更不同的体验。

SBCL and Clozure CL are both very useful implementations of Common Lisp on Linux. (Overview about various implementations: Common Lisp survey.)

SBCL和Clozure CL都是Linux上Common Lisp的非常有用的实现。 (关于各种实现的概述:Common Lisp调查。)

As a starting point I would recommend to use Peter Seibel's excellent book Practical Common Lisp, that is both available online and printed.

作为一个起点,我建议使用Peter Seibel的优秀书籍Practical Common Lisp,它既可以在线获得,也可以打印出来。

Community pointers are here: CLIKI.

社区指针在这里:CLIKI。

#3


Prolog may be what you are looking for.

Prolog可能就是你要找的。

Edit

The first commenter is right, my answer was pretty short and not very useful, so:

第一个评论者是对的,我的回答很短,不太有用,所以:

My preferred implementation is SWI-Prolog. I personally learned from Prolog Programming for Artificial Intelligence. It's style is pretty clear and it contains many examples, but I don't own any other book on logic programming (it's a shame, really :) so I have no basis for comparison.

我首选的实现是SWI-Prolog。我个人从Prolog Programming for Artificial Intelligence中学到了很多东西。它的风格很清晰,它包含很多例子,但我没有任何关于逻辑编程的书(真是太遗憾了),所以我没有比较基础。

#4


Erlang is pretty interesting to learn because of its super efficient concurrency model, and the ease with which you can write distributed systems (for an example of this, CouchDB was written in Erlang). It's a dynamically typed functional language, but you can also write code in a procedural fashion. The tutorial I learned it with is called "Getting Started with Erlang", which covers just about every part of the language.

Erlang非常有趣,因为它具有超高效的并发模型,并且您可以轻松编写分布式系统(例如,CouchDB是用Erlang编写的)。它是一种动态类型的函数式语言,但您也可以以过程的方式编写代码。我学习它的教程叫做“Erlang入门”,它几乎涵盖了语言的每个部分。

#5


I'm going to recommend something that I haven't yet tried, but plan to, so you have to judge for yourself this one. There's this language, called IO, which is particular in that its prototype-based, like JavaScript, but also borrows concepts from many other languages. Its job market it's probably nonexistent, but I thought I mention this language.

我打算推荐一些我尚未尝试过的东西,但是要计划,所以你必须自己判断这个。这种语言称为IO,它的特殊之处在于它基于原型,就像JavaScript一样,但也借用了许多其他语言的概念。它的就业市场可能不存在,但我想我提到了这种语言。

Otherwise, a language from the Lisp family may be pretty different from what you already know. In that regard I'd recommend Scheme, which is, in my opinion, more elegant than Common Lisp. The new concept that you might found interesting in Scheme is continuations.

否则,Lisp系列中的语言可能与您已知的语言有很大不同。在这方面,我推荐Scheme,在我看来,它比Common Lisp更优雅。您可能在Scheme中感兴趣的新概念是延续。

If you take the Scheme path, make some time to watch these videos from 1986. They're amazing.

如果你采取计划路径,花一些时间观看这些视频从1986年。他们是惊人的。

#6


Have a look at Smalltalk ! Either Cincom VWST or Smalltalk/X - dont bother with Squeak as the interface is terrible). VAST is good also but really only Windows centric. And dont bother about the sceptics that pore scorn on Smalltalk -- they arent using it and are stuck in the morass of edit-run-debug cycle languages and multiple dispirt linked libraries. :-)

看看Smalltalk吧! Cincom VWST或Smalltalk / X - 不要打扰Squeak,因为接口很糟糕)。 VAST也不错,但实际上只有Windows中心。并且不要为那些在Smalltalk上嗤之以鼻的怀疑论者而烦恼 - 他们并没有使用它,而是陷入编辑运行调试循环语言和多个文档链接库的泥潭中。 :-)

Why these Smalltalks - well, they come complete wth excellent IDE, GUI tools builtin, best debugger you will ever see, online help, and is totally independent of the underlying OS. Eg a ST/X programming running under Linux can be transfered ( source code) to Windows ST/X and it should execute.

为什么这些Smalltalks - 嗯,他们完整的IDE,内置的GUI工具,你将看到的最佳调试器,在线帮助,并完全独立于底层操作系统。例如,在Linux下运行的ST / X编程可以传输(源代码)到Windows ST / X并且它应该执行。

ST/X is free with only a very minor licience restrictions, Cincom offer a free NC ( Not Commercial ) version that is NOT restricted. I use ST/X as I prefer the default look & feel it offers. Their IDE interfaces are very similar.

ST / X是免费的,只有非常小的许可限制,Cincom提供免费的NC(非商业)版本,不受限制。我使用ST / X,因为我更喜欢它提供的默认外观。他们的IDE接口非常相似。

Languages without a IDE & GUI tools are just wasting your time as the world is really GUI, no matter how terrific the underlying language is. Eg Ruby is great, but with no IDE or easy GUI tools its really frustrating.

没有IDE和GUI工具的语言只是浪费你的时间,因为世界真的是GUI,无论底层语言有多么糟糕。例如Ruby很棒,但是没有IDE或简单的GUI工具,它真的令人沮丧。

Smalltalk is not easy to get into, and its not perfect,(what language is?) but very satisfying to learn & use. And now that the hardware and operating systems have finally caught up with Smalltalks needs . very efficient.

Smalltalk不容易进入,它不完美,(用什么语言?)但学习和使用非常令人满意。现在硬件和操作系统终于赶上了Smalltalks的需求。效率很高。

#7


If you want to make use of your Java and functional programming knowledge, and you want to learn a Lisp, then try Clojure.

如果你想利用你的Java和函数式编程知识,并且你想学习一个Lisp,那么试试Clojure。

The implementation is free and cross-platform including Linux, because it runs on the JVM. Being a Lisp, it's different enough (in useful and wonderful ways) from most other languages to make things interesting. Some features such as immutable data structures, multimethods, metadata support, focus on safe concurrency, etc. are fairly novel compared to the languages you listed. Clojure is geared heavily toward being a practical and useful language rather than an academic one. It's a functional language but not "pure", which is arguably a good thing. You can also trivially make use of any Java library from within Clojure.

该实现是免费的,包括Linux在内的跨平台,因为它在JVM上运行。作为一个Lisp,它与大多数其他语言的不同(以有用和美妙的方式)使事情变得有趣。与您列出的语言相比,某些功能(如不可变数据结构,多方法,元数据支持,专注于安全并发等)相当新颖。 Clojure非常注重成为一种实用而有用的语言而不是学术语言。它是一种功能性语言,但不是“纯粹的”,这可以说是一件好事。您还可以轻松地使用Clojure中的任何Java库。

Clojure is a new language, so the only book out so far is Programming Clojure, but it's a pretty good one. There's also a wiki which may not be entirely up-to-date, because the language is still evolving very quickly. The mailing list and IRC channel are very friendly, welcoming places to ask questions. The official website is also a good resource, of course.

Clojure是一种新语言,所以到目前为止唯一的书是Programming Clojure,但它是一个非常好的。还有一个维基可能不是完全最新的,因为语言仍在快速发展。邮件列表和IRC频道非常友好,欢迎提问的地方。当然,官方网站也是一个很好的资源。

#8


I second Rainer's Common Lisp recommendation.

我是第二个Rainer的Common Lisp推荐。

CL has all the things you're looking for and will provide a genuinely novel experience that will also make your coding efforts and approaches in other languages better.

CL拥有您正在寻找的所有东西,并将提供真正新颖的体验,这也将使您的编码工作和其他语言的方法更好。

But bring patience and persistence, you will have to grasp a lot of concepts that will seem alien at first.

但是要带来耐心和坚持,你必须掌握许多一开始看起来很陌生的概念。

#9


You could try Tcl. It was sufficiently different to provoke an adverse reaction in my brain, so I can't really tell you how I found it different, but there's been a lot of good stuff written in it (maybe less nowadays than earlier).

你可以试试Tcl。它在我的大脑中引起不良反应是完全不同的,所以我无法告诉你我是如何发现它的不同,但是它中写了很多好东西(现在可能比以前更少)。

#10


C# has a free implementation in Linux under the Mono project, and it arguably is a very marketable skill unless you're completely anti-Microsoft.

C#在Mono项目下有一个免费的Linux实现,除非你完全反微软,否则它可以说是一个非常有市场的技能。

My favorite C# book is Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition.

我最喜欢的C#书是Pro C#2008和.NET 3.5 Platform,第四版。

If you're really want exotic, F# is an OCaml style language that runs on the .NET platform and mono, and is getting a lot of attention these days.

如果你真的想要充满异国情调,F#是一种OCaml风格的语言,可以在.NET平台和单声道上运行,并且近来受到了很多关注。

http://msdn.microsoft.com/en-us/fsharp/default.aspx

Books for F#:
http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Daps&field-keywords=f%23

F#的书籍:http://www.amazon.com/s/ref=nb_ss_gw?url = search-alias%3Daps&field-keyword = f%23

#11


Of the suggestions I've seen so far, I like Lisp (see Secko) and Smalltalk (see brett), as both will give you another view of languages. Prolog even more so.

在我到目前为止看到的建议中,我喜欢Lisp(参见Secko)和Smalltalk(参见brett),因为它们都会为您提供另一种语言视图。 Prolog更是如此。

Another language that is different is Erlang -- I haven't had a chance to learn it yet, but it handles concurrency in a different way. The best link I can give you is the main website.

另一种不同的语言是Erlang - 我还没有机会学习它,但它以不同的方式处理并发。我能给你的最佳链接是主网站。

In terms of recommendations, Lisp is good both because it is currently used and because it is very old. The others you will have to look at sources and see which one appeals the most.

就推荐而言,Lisp很好,因为它目前使用并且因为它很老。其他人你必须查看来源,看看哪一个最吸引人。

#12


Try FORTRAN, then? I hear it's still actively used by the scientific and mathemematical communities, plus it should be dissimilar enough to be a learning challenge.

试试FORTRAN吧?我听说它仍然被科学和数学社区积极使用,而且应该与学习挑战不同。

Compilers:
http://gcc.gnu.org/wiki/GFortranBinaries
http://www.g95.org/
http://www.fortran.com/compilers.html
http://www.thefreecountry.com/compilers/fortran.shtml

编译器:http://gcc.gnu.org/wiki/GFortranBinaries http://www.g95.org/ http://www.fortran.com/compilers.html http://www.thefreecountry.com/compilers/ fortran.shtml

IDEs:
http://www.eclipse.org/photran/
http://force.lepsch.com/ (FORTRAN 77 only)

IDE:http://www.eclipse.org/photran/ http://force.lepsch.com/(仅限FORTRAN 77)

Tutorials:
Introduction to Modern FORTRAN: http://www-uxsup.csx.cam.ac.uk/courses/Fortran/
FORTRAN 90 Tutorial: http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/fortran.html

教程:现代FORTRAN简介:http://www-uxsup.csx.cam.ac.uk/courses/Fortran/ FORTRAN 90教程:http://www.cs.mtu.edu/~shene/COURSES/cs201/ NOTES / fortran.html

You could also learn Visual Basic.NET, in case you ever get forced to maintain that. Evidently mono has a working Linux implementation of it: http://www.mono-project.com/Visual_Basic

您也可以学习Visual Basic.NET,以防您*维护它。显然,mono有一个可行的Linux实现:http://www.mono-project.com/Visual_Basic

#13


Factor is pretty radically different from everything you said you know, and also everything else listed. It's stack-based, like Forth, but has a fairly comprehensive library and a lot of interesting features.

因素与您所知道的所有内容以及列出的其他内容完全不同。它像Forth一样基于堆栈,但有一个相当全面的库和许多有趣的功能。

Ada is very practical -- there's a compiler based on gcc -- but also quite different from the other imperative languages you know. I find the type system a bit stifling, but it was worth learning something about.

Ada非常实用 - 有一个基于gcc的编译器 - 但与你知道的其他命令式语言有很大不同。我发现类型系统有点令人窒息,但值得学习一些东西。

#14


Lisp is a great HLL, it has everything that other languages lack. In my opinion, this is a very good language that can "satisfy" any programmers needs.

Lisp是一个很棒的HLL,它拥有其他语言所缺乏的一切。在我看来,这是一种非常好的语言,可以“满足”任何程序员的需求。

Perl is also a HLL like Lisp, it's interesting and fun at the same time. It derives from C so you can pick it up as you go. It can be hard sometimes and some people tend to get lost while learning, but it's worth knowing.

Perl也是像Lisp一样的HLL,它既有趣又有趣。它来自C,所以你可以随时随地拿起它。有时可能很难,有些人在学习时往往会迷路,但值得了解。

Both languages are free of use and come with Linux.

这两种语言都是免费使用的,并附带Linux。

Links

Lisp: If Lisp is so great, An Introduction and Tutorial for Common Lisp

Lisp:如果Lisp非常棒,那么Common Lisp的简介和教程

Perl: PERL -- Practical Extraction and Report Language

Perl:PERL - 实用提取和报告语言

Books

On Lisp - Great book by Paul Graham on the Lisp language. It's free and you can download it here.

关于Lisp - Paul Graham关于Lisp语言的好书。它是免费的,你可以在这里下载。

#15


Scala has been very good for making me see programming in a new light. I haven't used it for anything worklike yet, but it's still affected how I write code in other languages - not just Java, but PHP. I recently wrote a simple parser for a WordPress plugin, and the code is vastly more functional and immutable than it would have been six months ago, and better for it, despite the lack of enforcement in PHP.

Scala非常适合让我看到新的编程。我还没有将它用于任何类似的工作,但它仍然影响我在其他语言中编写代码的方式 - 不仅仅是Java,而是PHP。我最近为一个WordPress插件编写了一个简单的解析器,这个代码比六个月前更加实用和不可变,并且尽管在PHP中没有强制执行,但它更好。

The only other language to have affected the way I work so dramatically is Perl, nearly a decade earlier. Perl has contributed a lot to the way I pseudo-code, even if I never touch the language itself.

影响我工作方式的另一种语言是近十年前的Perl。 Perl为伪编码的方式做出了很多贡献,即使我从不触及语言本身。

Many people compare the functional aspects of Scala to Haskell. You may even imagine that knowing Haskell means you already know all Scala could teach you, but I don't believe that. The way Scala combines OO and function has a way of making it seem like that's actually the truest form of both of them.

许多人将Scala的功能方面与Haskell进行比较。你甚至可以想象,知道Haskell意味着你已经知道所有Scala都可以教你,但我不相信。 Scala结合OO和函数的方式有一种方式使它看起来实际上是两者中最真实的形式。

#16


Like you, I have over a dozen languages under my belt. While shopping for something to play with for writing a cross-compiler, I ran across ML and family. Many very good ideas there, and they have taught me to write code is a much different way; for example, my JavaScript now has a decidedly functional bent.

像你一样,我有十几种语言。在购买用于编写交叉编译器的东西时,我遇到了ML和家人。那里有许多非常好的想法,他们教会我编写代码是一种非常不同的方式;例如,我的JavaScript现在具有明显的功能性。

After toying with OCaml under Windows a while (and getting frustrated with stability issues), I ran across F#, an offspring of OCaml. The two are quite similar (can cross-compile a lot of code), but OCaml apparently has a really good macro system (P4) and type-classes (in support of writing "strongly typed" operators against generic types), while F# has excellent support for asynchronous and parallel operations, monads, units-of-measure for numeric types, as well as cleaner OO syntax and awesome IDE integration (VS2008 & will be released in-the-box with VS2010). I much prefer F# these days, since I have access to the whole .NET runtime and loads of 3rd party libraries. In fact, I write most of my one-off and utility code in F# now; for me, its generally much more productive than C++, JavaScript, C#, PowerShell, or anything else.

在Windows下玩OCaml一段时间后(并且对稳定性问题感到沮丧),我遇到了OC #l的后代F#。两者非常相似(可以交叉编译很多代码),但OCaml显然有一个非常好的宏系统(P4)和类型类(支持编写针对泛型类型的“强类型”运算符),而F#有对异步和并行操作,monad,数字类型的度量单位,以及更清晰的OO语法和令人敬畏的IDE集成(VS2008&将与VS2010一起发布)的出色支持。我更喜欢F#,因为我可以访问整个.NET运行时和第三方库的负载。事实上,我现在在F#中编写了大部分的一次性和实用程序代码;对我来说,它通常比C ++,JavaScript,C#,PowerShell或其他任何东西都高效。

F# works fairly well under Mono on Linux, and has a good following there. The compiler and runtime will be open sourced once stable (released with VS2010), and the developers consider Mono support enough of a priority for it to be seriously considered for non-Microsoft use.

F#在Linux下的Mono下工作得相当好,并且在那里有很好的关注。编译器和运行时将一旦稳定开源(与VS2010一起发布),并且开发人员认为Mono支持足够的优先级,因此非严格考虑非Microsoft使用。

#1


Neither Lisp nor OCaml is super far afield from what you already know. Here are four suggestions chosen partly for intrinsic interest and partly to stretch your horizons.

Lisp和OCaml都不是你所知道的超级远方。这里有四个建议,部分是为了内在的兴趣,部分是为了扩展你的视野。

  • A logic programming language, probably Prolog. I haven't found good materials online, but the book The Art of Prolog by Sterling and Shapiro is excellent. The more basic textbook by Clocksin and Mellish is also good. The main point of interest is programming with relations, not functions.

    一种逻辑编程语言,可能是Prolog。我没有在网上找到好的资料,但是Sterling和Shapiro的“Prolog的艺术”一书非常出色。 Clocksin和Mellish的基础教科书也很好。主要的兴趣点是用关系编程而不是函数。

  • A pure object-oriented language, either Smalltalk or Self. If you've only used hybrid object-oriented languages you'll be amazed how beautiful pure object-orientation can be. I've linked to the Squeak implementation of Smalltalk. I personally would recommend learning Smalltalk before tackling Self; there's a very large and active community and the software is well developed. Self stands on Smalltalk's shoulders and is an even more inspiring design, but the community is much smaller. For those who have access to the ACM Digital library I recommend the excellent talk by Dave Ungar at HOPL-III; the paper is also pretty good.

    纯粹的面向对象语言,Smalltalk或Self。如果您只使用混合面向对象语言,您会惊奇地发现纯粹的面向对象是多么美丽。我已经链接到了Smalltalk的Squeak实现。我个人会建议在处理Self之前学习Smalltalk;这是一个非常庞大和活跃的社区,软件也很发达。 Self站在Smalltalk的肩膀上,是一个更具启发性的设计,但社区规模要小得多。对于那些可以访问ACM数字图书馆的人,我推荐Dave Ungar在HOPL-III上的精彩演讲;这篇论文也很不错。

  • The Icon programming language has two great things going for it; a powerful and unusual evaluation model with implicit backtracking, and a user-extensible model of string processing that beats regular expressions all hollow. I'm sorry to say that Icon has never quite kept pace with the times, and of all my recommendations it is the least practical. In fact I fear the language is moribund. But it will stretch your mind almost as much as Haskell, and in wildly different directions. Icon is still very useful for string-processing tasks of modest size.

    Icon编程语言有两件好事;一个功能强大且不同寻常的评估模型,带有隐式回溯,以及一个用户可扩展的字符串处理模型,可以将正则表达式全部空洞化。我很遗憾地说Icon从来没有跟上时代的步伐,而且我的所有建议都是最不实用的。事实上,我担心语言会奄奄一息。但它会让你的思绪几乎和Haskell一样,并且在不同的方向上。 Icon对于适度大小的字符串处理任务仍然非常有用。

    You can read about Icon string processing in an article by Ralph Griswold from Computer Journal.

    您可以在计算机杂志的Ralph Griswold撰写的文章中阅读有关图标字符串处理的内容。

  • The Lua programming language is my last and least radical suggestion. Its interest is not so much in novel language features or paradigms but in the superb engineering of the language and its implementation. Lua occupies a number of niches, including scripting, gaming, string processing, and lightweight functional programming. But its main point of interest is its seamless integration with C, and to get the full benefit, you should bind a C library into Lua.

    Lua编程语言是我最后也是最不激进的建议。它的兴趣不在于新颖的语言特征或范例,而在于语言及其实现的精湛工程。 Lua占据了许多领域,包括脚本,游戏,字符串处理和轻量级函数式编程。但它的主要兴趣点是它与C的无缝集成,为了获得全部好处,你应该将一个C库绑定到Lua。

    The HOPL-III web site also contains an excellent talk and paper about Lua.

    HOPL-III网站上还有一篇关于Lua的优秀演讲和论文。

#2


Both Common Lisp and Ocaml are certainly useful to learn. If you already know Haskell, CL might be the more different experience.

Common Lisp和Ocaml都非常有用。如果您已经了解Haskell,那么CL可能是更不同的体验。

SBCL and Clozure CL are both very useful implementations of Common Lisp on Linux. (Overview about various implementations: Common Lisp survey.)

SBCL和Clozure CL都是Linux上Common Lisp的非常有用的实现。 (关于各种实现的概述:Common Lisp调查。)

As a starting point I would recommend to use Peter Seibel's excellent book Practical Common Lisp, that is both available online and printed.

作为一个起点,我建议使用Peter Seibel的优秀书籍Practical Common Lisp,它既可以在线获得,也可以打印出来。

Community pointers are here: CLIKI.

社区指针在这里:CLIKI。

#3


Prolog may be what you are looking for.

Prolog可能就是你要找的。

Edit

The first commenter is right, my answer was pretty short and not very useful, so:

第一个评论者是对的,我的回答很短,不太有用,所以:

My preferred implementation is SWI-Prolog. I personally learned from Prolog Programming for Artificial Intelligence. It's style is pretty clear and it contains many examples, but I don't own any other book on logic programming (it's a shame, really :) so I have no basis for comparison.

我首选的实现是SWI-Prolog。我个人从Prolog Programming for Artificial Intelligence中学到了很多东西。它的风格很清晰,它包含很多例子,但我没有任何关于逻辑编程的书(真是太遗憾了),所以我没有比较基础。

#4


Erlang is pretty interesting to learn because of its super efficient concurrency model, and the ease with which you can write distributed systems (for an example of this, CouchDB was written in Erlang). It's a dynamically typed functional language, but you can also write code in a procedural fashion. The tutorial I learned it with is called "Getting Started with Erlang", which covers just about every part of the language.

Erlang非常有趣,因为它具有超高效的并发模型,并且您可以轻松编写分布式系统(例如,CouchDB是用Erlang编写的)。它是一种动态类型的函数式语言,但您也可以以过程的方式编写代码。我学习它的教程叫做“Erlang入门”,它几乎涵盖了语言的每个部分。

#5


I'm going to recommend something that I haven't yet tried, but plan to, so you have to judge for yourself this one. There's this language, called IO, which is particular in that its prototype-based, like JavaScript, but also borrows concepts from many other languages. Its job market it's probably nonexistent, but I thought I mention this language.

我打算推荐一些我尚未尝试过的东西,但是要计划,所以你必须自己判断这个。这种语言称为IO,它的特殊之处在于它基于原型,就像JavaScript一样,但也借用了许多其他语言的概念。它的就业市场可能不存在,但我想我提到了这种语言。

Otherwise, a language from the Lisp family may be pretty different from what you already know. In that regard I'd recommend Scheme, which is, in my opinion, more elegant than Common Lisp. The new concept that you might found interesting in Scheme is continuations.

否则,Lisp系列中的语言可能与您已知的语言有很大不同。在这方面,我推荐Scheme,在我看来,它比Common Lisp更优雅。您可能在Scheme中感兴趣的新概念是延续。

If you take the Scheme path, make some time to watch these videos from 1986. They're amazing.

如果你采取计划路径,花一些时间观看这些视频从1986年。他们是惊人的。

#6


Have a look at Smalltalk ! Either Cincom VWST or Smalltalk/X - dont bother with Squeak as the interface is terrible). VAST is good also but really only Windows centric. And dont bother about the sceptics that pore scorn on Smalltalk -- they arent using it and are stuck in the morass of edit-run-debug cycle languages and multiple dispirt linked libraries. :-)

看看Smalltalk吧! Cincom VWST或Smalltalk / X - 不要打扰Squeak,因为接口很糟糕)。 VAST也不错,但实际上只有Windows中心。并且不要为那些在Smalltalk上嗤之以鼻的怀疑论者而烦恼 - 他们并没有使用它,而是陷入编辑运行调试循环语言和多个文档链接库的泥潭中。 :-)

Why these Smalltalks - well, they come complete wth excellent IDE, GUI tools builtin, best debugger you will ever see, online help, and is totally independent of the underlying OS. Eg a ST/X programming running under Linux can be transfered ( source code) to Windows ST/X and it should execute.

为什么这些Smalltalks - 嗯,他们完整的IDE,内置的GUI工具,你将看到的最佳调试器,在线帮助,并完全独立于底层操作系统。例如,在Linux下运行的ST / X编程可以传输(源代码)到Windows ST / X并且它应该执行。

ST/X is free with only a very minor licience restrictions, Cincom offer a free NC ( Not Commercial ) version that is NOT restricted. I use ST/X as I prefer the default look & feel it offers. Their IDE interfaces are very similar.

ST / X是免费的,只有非常小的许可限制,Cincom提供免费的NC(非商业)版本,不受限制。我使用ST / X,因为我更喜欢它提供的默认外观。他们的IDE接口非常相似。

Languages without a IDE & GUI tools are just wasting your time as the world is really GUI, no matter how terrific the underlying language is. Eg Ruby is great, but with no IDE or easy GUI tools its really frustrating.

没有IDE和GUI工具的语言只是浪费你的时间,因为世界真的是GUI,无论底层语言有多么糟糕。例如Ruby很棒,但是没有IDE或简单的GUI工具,它真的令人沮丧。

Smalltalk is not easy to get into, and its not perfect,(what language is?) but very satisfying to learn & use. And now that the hardware and operating systems have finally caught up with Smalltalks needs . very efficient.

Smalltalk不容易进入,它不完美,(用什么语言?)但学习和使用非常令人满意。现在硬件和操作系统终于赶上了Smalltalks的需求。效率很高。

#7


If you want to make use of your Java and functional programming knowledge, and you want to learn a Lisp, then try Clojure.

如果你想利用你的Java和函数式编程知识,并且你想学习一个Lisp,那么试试Clojure。

The implementation is free and cross-platform including Linux, because it runs on the JVM. Being a Lisp, it's different enough (in useful and wonderful ways) from most other languages to make things interesting. Some features such as immutable data structures, multimethods, metadata support, focus on safe concurrency, etc. are fairly novel compared to the languages you listed. Clojure is geared heavily toward being a practical and useful language rather than an academic one. It's a functional language but not "pure", which is arguably a good thing. You can also trivially make use of any Java library from within Clojure.

该实现是免费的,包括Linux在内的跨平台,因为它在JVM上运行。作为一个Lisp,它与大多数其他语言的不同(以有用和美妙的方式)使事情变得有趣。与您列出的语言相比,某些功能(如不可变数据结构,多方法,元数据支持,专注于安全并发等)相当新颖。 Clojure非常注重成为一种实用而有用的语言而不是学术语言。它是一种功能性语言,但不是“纯粹的”,这可以说是一件好事。您还可以轻松地使用Clojure中的任何Java库。

Clojure is a new language, so the only book out so far is Programming Clojure, but it's a pretty good one. There's also a wiki which may not be entirely up-to-date, because the language is still evolving very quickly. The mailing list and IRC channel are very friendly, welcoming places to ask questions. The official website is also a good resource, of course.

Clojure是一种新语言,所以到目前为止唯一的书是Programming Clojure,但它是一个非常好的。还有一个维基可能不是完全最新的,因为语言仍在快速发展。邮件列表和IRC频道非常友好,欢迎提问的地方。当然,官方网站也是一个很好的资源。

#8


I second Rainer's Common Lisp recommendation.

我是第二个Rainer的Common Lisp推荐。

CL has all the things you're looking for and will provide a genuinely novel experience that will also make your coding efforts and approaches in other languages better.

CL拥有您正在寻找的所有东西,并将提供真正新颖的体验,这也将使您的编码工作和其他语言的方法更好。

But bring patience and persistence, you will have to grasp a lot of concepts that will seem alien at first.

但是要带来耐心和坚持,你必须掌握许多一开始看起来很陌生的概念。

#9


You could try Tcl. It was sufficiently different to provoke an adverse reaction in my brain, so I can't really tell you how I found it different, but there's been a lot of good stuff written in it (maybe less nowadays than earlier).

你可以试试Tcl。它在我的大脑中引起不良反应是完全不同的,所以我无法告诉你我是如何发现它的不同,但是它中写了很多好东西(现在可能比以前更少)。

#10


C# has a free implementation in Linux under the Mono project, and it arguably is a very marketable skill unless you're completely anti-Microsoft.

C#在Mono项目下有一个免费的Linux实现,除非你完全反微软,否则它可以说是一个非常有市场的技能。

My favorite C# book is Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition.

我最喜欢的C#书是Pro C#2008和.NET 3.5 Platform,第四版。

If you're really want exotic, F# is an OCaml style language that runs on the .NET platform and mono, and is getting a lot of attention these days.

如果你真的想要充满异国情调,F#是一种OCaml风格的语言,可以在.NET平台和单声道上运行,并且近来受到了很多关注。

http://msdn.microsoft.com/en-us/fsharp/default.aspx

Books for F#:
http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Daps&field-keywords=f%23

F#的书籍:http://www.amazon.com/s/ref=nb_ss_gw?url = search-alias%3Daps&field-keyword = f%23

#11


Of the suggestions I've seen so far, I like Lisp (see Secko) and Smalltalk (see brett), as both will give you another view of languages. Prolog even more so.

在我到目前为止看到的建议中,我喜欢Lisp(参见Secko)和Smalltalk(参见brett),因为它们都会为您提供另一种语言视图。 Prolog更是如此。

Another language that is different is Erlang -- I haven't had a chance to learn it yet, but it handles concurrency in a different way. The best link I can give you is the main website.

另一种不同的语言是Erlang - 我还没有机会学习它,但它以不同的方式处理并发。我能给你的最佳链接是主网站。

In terms of recommendations, Lisp is good both because it is currently used and because it is very old. The others you will have to look at sources and see which one appeals the most.

就推荐而言,Lisp很好,因为它目前使用并且因为它很老。其他人你必须查看来源,看看哪一个最吸引人。

#12


Try FORTRAN, then? I hear it's still actively used by the scientific and mathemematical communities, plus it should be dissimilar enough to be a learning challenge.

试试FORTRAN吧?我听说它仍然被科学和数学社区积极使用,而且应该与学习挑战不同。

Compilers:
http://gcc.gnu.org/wiki/GFortranBinaries
http://www.g95.org/
http://www.fortran.com/compilers.html
http://www.thefreecountry.com/compilers/fortran.shtml

编译器:http://gcc.gnu.org/wiki/GFortranBinaries http://www.g95.org/ http://www.fortran.com/compilers.html http://www.thefreecountry.com/compilers/ fortran.shtml

IDEs:
http://www.eclipse.org/photran/
http://force.lepsch.com/ (FORTRAN 77 only)

IDE:http://www.eclipse.org/photran/ http://force.lepsch.com/(仅限FORTRAN 77)

Tutorials:
Introduction to Modern FORTRAN: http://www-uxsup.csx.cam.ac.uk/courses/Fortran/
FORTRAN 90 Tutorial: http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/fortran.html

教程:现代FORTRAN简介:http://www-uxsup.csx.cam.ac.uk/courses/Fortran/ FORTRAN 90教程:http://www.cs.mtu.edu/~shene/COURSES/cs201/ NOTES / fortran.html

You could also learn Visual Basic.NET, in case you ever get forced to maintain that. Evidently mono has a working Linux implementation of it: http://www.mono-project.com/Visual_Basic

您也可以学习Visual Basic.NET,以防您*维护它。显然,mono有一个可行的Linux实现:http://www.mono-project.com/Visual_Basic

#13


Factor is pretty radically different from everything you said you know, and also everything else listed. It's stack-based, like Forth, but has a fairly comprehensive library and a lot of interesting features.

因素与您所知道的所有内容以及列出的其他内容完全不同。它像Forth一样基于堆栈,但有一个相当全面的库和许多有趣的功能。

Ada is very practical -- there's a compiler based on gcc -- but also quite different from the other imperative languages you know. I find the type system a bit stifling, but it was worth learning something about.

Ada非常实用 - 有一个基于gcc的编译器 - 但与你知道的其他命令式语言有很大不同。我发现类型系统有点令人窒息,但值得学习一些东西。

#14


Lisp is a great HLL, it has everything that other languages lack. In my opinion, this is a very good language that can "satisfy" any programmers needs.

Lisp是一个很棒的HLL,它拥有其他语言所缺乏的一切。在我看来,这是一种非常好的语言,可以“满足”任何程序员的需求。

Perl is also a HLL like Lisp, it's interesting and fun at the same time. It derives from C so you can pick it up as you go. It can be hard sometimes and some people tend to get lost while learning, but it's worth knowing.

Perl也是像Lisp一样的HLL,它既有趣又有趣。它来自C,所以你可以随时随地拿起它。有时可能很难,有些人在学习时往往会迷路,但值得了解。

Both languages are free of use and come with Linux.

这两种语言都是免费使用的,并附带Linux。

Links

Lisp: If Lisp is so great, An Introduction and Tutorial for Common Lisp

Lisp:如果Lisp非常棒,那么Common Lisp的简介和教程

Perl: PERL -- Practical Extraction and Report Language

Perl:PERL - 实用提取和报告语言

Books

On Lisp - Great book by Paul Graham on the Lisp language. It's free and you can download it here.

关于Lisp - Paul Graham关于Lisp语言的好书。它是免费的,你可以在这里下载。

#15


Scala has been very good for making me see programming in a new light. I haven't used it for anything worklike yet, but it's still affected how I write code in other languages - not just Java, but PHP. I recently wrote a simple parser for a WordPress plugin, and the code is vastly more functional and immutable than it would have been six months ago, and better for it, despite the lack of enforcement in PHP.

Scala非常适合让我看到新的编程。我还没有将它用于任何类似的工作,但它仍然影响我在其他语言中编写代码的方式 - 不仅仅是Java,而是PHP。我最近为一个WordPress插件编写了一个简单的解析器,这个代码比六个月前更加实用和不可变,并且尽管在PHP中没有强制执行,但它更好。

The only other language to have affected the way I work so dramatically is Perl, nearly a decade earlier. Perl has contributed a lot to the way I pseudo-code, even if I never touch the language itself.

影响我工作方式的另一种语言是近十年前的Perl。 Perl为伪编码的方式做出了很多贡献,即使我从不触及语言本身。

Many people compare the functional aspects of Scala to Haskell. You may even imagine that knowing Haskell means you already know all Scala could teach you, but I don't believe that. The way Scala combines OO and function has a way of making it seem like that's actually the truest form of both of them.

许多人将Scala的功能方面与Haskell进行比较。你甚至可以想象,知道Haskell意味着你已经知道所有Scala都可以教你,但我不相信。 Scala结合OO和函数的方式有一种方式使它看起来实际上是两者中最真实的形式。

#16


Like you, I have over a dozen languages under my belt. While shopping for something to play with for writing a cross-compiler, I ran across ML and family. Many very good ideas there, and they have taught me to write code is a much different way; for example, my JavaScript now has a decidedly functional bent.

像你一样,我有十几种语言。在购买用于编写交叉编译器的东西时,我遇到了ML和家人。那里有许多非常好的想法,他们教会我编写代码是一种非常不同的方式;例如,我的JavaScript现在具有明显的功能性。

After toying with OCaml under Windows a while (and getting frustrated with stability issues), I ran across F#, an offspring of OCaml. The two are quite similar (can cross-compile a lot of code), but OCaml apparently has a really good macro system (P4) and type-classes (in support of writing "strongly typed" operators against generic types), while F# has excellent support for asynchronous and parallel operations, monads, units-of-measure for numeric types, as well as cleaner OO syntax and awesome IDE integration (VS2008 & will be released in-the-box with VS2010). I much prefer F# these days, since I have access to the whole .NET runtime and loads of 3rd party libraries. In fact, I write most of my one-off and utility code in F# now; for me, its generally much more productive than C++, JavaScript, C#, PowerShell, or anything else.

在Windows下玩OCaml一段时间后(并且对稳定性问题感到沮丧),我遇到了OC #l的后代F#。两者非常相似(可以交叉编译很多代码),但OCaml显然有一个非常好的宏系统(P4)和类型类(支持编写针对泛型类型的“强类型”运算符),而F#有对异步和并行操作,monad,数字类型的度量单位,以及更清晰的OO语法和令人敬畏的IDE集成(VS2008&将与VS2010一起发布)的出色支持。我更喜欢F#,因为我可以访问整个.NET运行时和第三方库的负载。事实上,我现在在F#中编写了大部分的一次性和实用程序代码;对我来说,它通常比C ++,JavaScript,C#,PowerShell或其他任何东西都高效。

F# works fairly well under Mono on Linux, and has a good following there. The compiler and runtime will be open sourced once stable (released with VS2010), and the developers consider Mono support enough of a priority for it to be seriously considered for non-Microsoft use.

F#在Linux下的Mono下工作得相当好,并且在那里有很好的关注。编译器和运行时将一旦稳定开源(与VS2010一起发布),并且开发人员认为Mono支持足够的优先级,因此非严格考虑非Microsoft使用。