为什么使用Ruby而不是Smalltalk?

时间:2021-12-23 11:47:18

Ruby is becoming popular, largely from the influence Ruby on Rails, but it feels like it is currently struggling through its adolescence. There are a lot of similarities between Ruby and Smalltalk -- maglev is a testament to that. Despite having a more unusual syntax, Smalltalk has all (if not more) of the object-oriented beauty of Ruby.

Ruby正在变得流行起来,很大程度上是受到Ruby on Rails的影响,但它现在感觉像是在挣扎着度过青春期。Ruby和Smalltalk有很多相似之处——maglev是这方面的证明。尽管Smalltalk有更不寻常的语法,但它已经具备了Ruby的面向对象之美。

From what I have read, Smalltalk seems to have Ruby beat on:

根据我所读到的,Smalltalk似乎有Ruby beat on:

It seems like Ruby is just reinventing the wheel. So, why don't Ruby developers use SmallTalk? What does Ruby have the Smalltalk doesn't?

看起来Ruby只是在重新发明*。那么,为什么Ruby开发人员不使用SmallTalk呢?Ruby有什么Smalltalk没有的呢?

For the record: I'm a Ruby guy with little to no experience in Smalltalk, but I'm starting to wonder why.

我是一个Ruby的家伙,在Smalltalk方面几乎没有经验,但我开始想知道为什么。


Edit: I think the ease-of-scripting issue has been addressed by GNU Smalltalk. As I understand it, this allows you to write smalltalk in regular old text files, and you no longer need to be in the Smalltalk IDE. You can then run your scripts with:

编辑:我认为GNU Smalltalk已经解决了易于编写脚本的问题。按照我的理解,这允许您在常规的旧文本文件中编写smalltalk,并且您不再需要在smalltalk IDE中。然后,您可以运行您的脚本与:

gst smalltalk_file

28 个解决方案

#1


87  

I'm more of a Pythonista than a Ruby user, however the same things hold for Ruby for much the same reasons.

我比Ruby用户更喜欢python,但是同样的事情也有同样的原因。

  • The architecture of Smalltalk is somewhat insular whereas Python and Ruby were built from the ground up to facilitate integration. Smalltalk never really gained a body of hybrid application support in the way that Python and Ruby have, so the concept of 'smalltalk as embedded scripting language' never caught on.

    As an aside, Java was not the easiest thing to interface with other code bases (JNI is fairly clumsy), but that did not stop it from gaining mindshare. IMO the interfacing argument is significant - ease of embedding hasn't hurt Python - but this argument only holds moderate weight as not all applications require this capability. Also, later versions of Smalltalk did substantially address the insularity.

    Smalltalk的体系结构有些孤立,而Python和Ruby则是从底层构建的,以便于集成。Smalltalk从未像Python和Ruby那样获得大量的混合应用程序支持,因此“Smalltalk作为嵌入式脚本语言”的概念从未流行起来。顺便提一下,Java并不是与其他代码库进行接口的最简单的东西(JNI相当笨拙),但这并没有阻止它获得关注。在我看来,接口参数很重要——易于嵌入不会损害Python——但是这个参数只具有一定的分量,因为不是所有应用程序都需要这个功能。而且,后来的Smalltalk版本确实很大程度上解决了岛国性质。

  • The class library of most of the main smalltalk implementations (VisualWorks, VisualAge etc.) was large and had reputation for a fairly steep learning curve. Most key functionality in Smalltalk is hidden away somewhere in the class library, even basic stuff like streams and collections. The language paradigm is also something of a culture shock for someone not familiar with it, and the piecemeal view of the program presented by the browser is quite different to what most people were used to.

    The overall effect is that Smalltalk got a (somewhat deserved) reputation for being difficult to learn; it takes quite a bit of time and effort to become a really proficient Smalltalk programmer. Ruby and Python are much easier to learn and to bring new programmers up to speed with.

    大多数主要smalltalk实现(VisualWorks、VisualAge等)的类库很大,并且以相当陡峭的学习曲线著称。Smalltalk中的大多数关键功能都隐藏在类库中的某个地方,甚至是流和集合之类的基本内容。对于不熟悉语言的人来说,语言范式也是一种文化冲击,浏览器呈现的程序的零碎视图与大多数人所习惯的非常不同。总体的影响是Smalltalk因难学而获得了(多少是应得的)声誉;要成为一个真正精通Smalltalk的程序员需要花费相当多的时间和精力。Ruby和Python更容易学习,也更容易让新的程序员跟上速度。

  • Historically, mainstream Smalltalk implementations were quite expensive and needed exotic hardware to run, as can be seen this net.lang.st80 posting from 1983. Windows 3.1, NT and '95 and OS/2 were the first mass market operating systems on mainstream hardware capable of supporting a Smalltalk implementation with decent native system integration. Previously, Mac or workstation hardware were the cheapest platforms capable of running Smalltalk effectively. Some implementations (particularly Digitalk) supported PC operating systems quite well and did succeed in gaining some traction.

    However, OS/2 was never that successful and Windows did not achieve mainstream acceptance until the mid 1990s. Unfortunately this coincided with the rise of the Web as a platform and a large marketing push behind Java. Java grabbed most of the mindshare in the latter part of the 1990s, rendering Smalltalk a bit of an also-ran.

    从历史上看,主流的Smalltalk实现非常昂贵,并且需要奇异的硬件来运行,可以看到这个net.lang。st80发布于1983年。Windows 3.1、NT和'95和OS/2是第一个主流硬件上的大众市场操作系统,能够支持Smalltalk实现,并具有良好的本地系统集成。以前,Mac或工作站硬件是能够有效运行Smalltalk的最便宜的平台。有些实现(特别是Digitalk)支持PC操作系统非常好,而且确实获得了一些关注。然而,OS/2从未如此成功,Windows直到90年代中期才被主流接受。不幸的是,与此同时,Web作为一个平台的崛起和Java背后巨大的市场推动。Java在上世纪90年代后期占据了大部分市场份额,使得Smalltalk有点落俗套。

  • Ruby and Python work in a more conventional toolchain and are not tightly coupled to a specific development environment. While the Smalltalk IDEs I have used are nice enough I use PythonWin for Python development largely because it has a nice editor with syntax highlighting and doesn't get underfoot.

    However, Smalltalk is was designed to be used with an IDE (in fact, Smalltalk was the original graphical IDE) and still has some nice features not replicated by other systems. Testing code with highlight and 'Show it' is still a very nice feature that I have never seen in a Python IDE, although I can't speak for Ruby.

    Ruby和Python在更传统的工具链中工作,并且没有与特定的开发环境紧密耦合。虽然我所使用的Smalltalk ide已经足够好了,但我在Python开发中使用PythonWin主要是因为它有一个很好的编辑器,具有语法高亮显示,并且不会在底层使用。然而,Smalltalk被设计成与IDE一起使用(实际上,Smalltalk是最初的图形化IDE),并且仍然有一些其他系统没有复制的优秀特性。用突出显示和“Show it”测试代码仍然是一个非常好的特性,这是我在Python IDE中从未见过的,尽管我不能代表Ruby。

  • Smalltalk was somewhat late coming to the web application party. Early efforts such as VisualWave were never terribly successful and it was not until Seaside came out that a decent web framework got acceptance in Smalltalk circles. In the meantime Java EE has had a complete acceptance lifecycle starting with raving fanboys promoting it and finally getting bored and moving onto Ruby ;-}

    Ironically, Seaside is starting to get a bit of mindshare among the cognoscenti so we may find that Smalltalk rides that cycle back into popularity.

    Smalltalk在web应用程序方面有点晚了。像VisualWave这样的早期工作从来都不是非常成功,而且直到Seaside一种像样的web框架才被Smalltalk圈子所接受。同时Java EE已经完全接受生命周期开始疯狂粉丝促进它,最后变得无聊和移动到Ruby;- }具有讽刺意味的是,海滨开始有点思想的专家,所以我们可能会发现,Smalltalk骑回循环流行。

Having said that, Smalltalk is a very nice system once you've worked out how to drive it.

说到这里,Smalltalk是一个非常好的系统,一旦你找到了如何驱动它。

#2


77  

When I leave my house in the morning to go to work, I often struggle with the decision to make a left or right turn out of my drive way (I live in the middle of a street). Either way will get me to my destination. One way leads me to the highway which, depending on traffic, will probably get me to the office the quickest. I get to drive very fast for at least part of the way and I have a good chance of seeing a pretty girl or two on their way to work :-)

当我早上离开家去上班的时候,我经常纠结于从我的车道上向左拐还是向右拐(我住在马路中间)。任何一种方式都能让我到达目的地。有一条路可以把我带到高速公路上,根据交通状况,这条高速公路可能会最快地把我送到办公室。我开车很快,至少在路上开了一段时间,我很有可能在上班的路上看到一两个漂亮姑娘。

The other way allows me to travel down a very enchanting, windy back road with complete tree cover. That path is quite enjoyable and of the two approaches is definitely the more fun, though it means that I will get to the office later than I would have had I taken the highway. Each way has its merits. On days that I am in a big hurry, I will usually take the highway though I may run into traffic and I also increase my chances of getting into an accident (if I am not careful in my haste). Other days I may choose the woody path and be driving along, enjoying the scenery and realize that I am running late. I may try to speed up, raising my chances of getting a ticket or causing an accident myself.

另一种方式是让我沿着一个非常迷人的,有风的,有完整的树罩的路走下去。这条路很有趣,而且这两种方式绝对更有趣,尽管这意味着我要比走高速公路晚到办公室。每种方法都有其优点。在急急忙忙的日子里,我通常会选择高速公路,虽然我可能会遇到交通堵塞,而且我也增加了发生事故的机会(如果我在匆忙中不小心的话)。有时,我可能会选择树林里的小路,开着车,欣赏风景,然后意识到我要迟到了。我可能会试着加快速度,增加我获得罚单的机会,或者自己造成事故。

Neither way is better than the other. They each have their benefits and risks, and each will get me to my goal.

两种方法都不如另一种。他们每个人都有各自的好处和风险,每个人都能让我达到我的目标。

#3


25  

I think your question is somewhat missing the point. You shouldn't choose, you should learn them both!

我认为你的问题有点不切题。你不应该选择,你应该同时学习它们!

If you truly are in a position that you can choose the next framework(vm, infrastructure) then you need to decided what to use and can ask a specific question with pros and cons from the perspective of what your application is inteded to do.

如果您确实能够选择下一个框架(vm、基础设施),那么您需要决定使用什么,并可以从应用程序要做什么的角度,提出一个带有正反两面的具体问题。

I have used smalltalk (love it) and ruby (love it).

我用过smalltalk(喜欢它)和ruby(喜欢它)。

At home or for open source project I can use every language I like, but when doing work I have to adopt.

在家里或者在开源项目中,我可以使用我喜欢的每一种语言,但是在做工作时,我必须采用。

I started to use ruby (at work) because we needed some scripting language that behaved more-or-less equally under solaris,linux and windows(98,2000,xp). Ruby was at that time unknown to average-joe and there didn't exist any rails. But it was easy to sell to everyone involved.

我开始使用ruby(在工作中),因为我们需要一些脚本语言,这些语言在solaris、linux和windows(98,2000,xp)下大致相同。Ruby在那个时候并不为人所知,joe也不存在任何rails。但向所有相关人士推销产品很容易。

(Why not python? the truth ? I once spend a week hunting for a bug that happened when a terminal converted my space to a tab and the intending got messed up).

(为什么不python呢?真相?有一次,我花了一个星期的时间去寻找一个bug,这个bug发生在一个终端将我的空间转换成一个标签,而“意想”被搞砸的时候。

So people started to code more and more in ruby because it was so relaxing, enjoying and not a cloud on the sky.

所以人们开始在ruby中编写越来越多的代码,因为它让人放松,享受,而不是天上的云。

Paul Graham sums it up

Paul Graham总结道

It's true, certainly, that most people don't choose programming languages simply based on their merits. Most programmers are told what language to use by someone else.

当然,大多数人选择编程语言并不仅仅是基于他们的优点。大多数程序员被告知其他人应该使用哪种语言。

and

To be attractive to hackers, a language must be good for writing the kinds of programs they want to write. And that means, perhaps surprisingly, that it has to be good for writing throwaway programs.

要吸引黑客,语言必须适合编写他们想要编写的程序。这意味着,或许令人惊讶的是,它必须适合编写一次性程序。

And when were at the Lisp land try to replace LISP with smalltalk

当我们在Lisp的土地上尝试用smalltalk取代Lisp

Ruby’s libraries, community, and momentum are good

Ruby的库、社区和动力都很好

So if LISP is still more powerful than Ruby, why not use LISP? The typical objections to programming in LISP are:

因此,如果LISP比Ruby更强大,为什么不使用LISP呢?对LISP编程的典型反对是:

  1. There aren’t enough libraries.
  2. 没有足够的库。
  3. We can’t hire LISP programmers.
  4. 我们不能雇佣LISP程序员。
  5. LISP has gone nowhere in the past 20 years.
  6. LISP在过去20年里毫无进展。

These aren’t overwhelming objections, but they’re certainly worth considering.

这些并不是压倒性的反对意见,但它们确实值得考虑。

and

Now, given a choice between a powerful language, and popular language, it may make excellent sense to pick the powerful one. But if the difference in power is minor, being popular has all sorts of nice advantages. In 2005, I’d think long and hard before choosing LISP over Ruby. I’d probably only do it if I needed optimized code, or macros which acted as full-fledged compilers.

现在,如果让我们在一种强大的语言和流行的语言之间做出选择,那么选择一种强大的语言可能是非常有意义的。但如果权力的差别不大,受欢迎有各种各样的好处。在2005年,在选择LISP而不是Ruby之前,我想了很久。我可能只在需要优化代码或作为成熟编译器的宏时才会这样做。

#4


22  

I would say the opposite: Smalltalk syntax is one of the simplest and powerful programming language syntaxes.

相反,Smalltalk语法是最简单、最强大的编程语言语法之一。

#5


19  

It's true the languages are very much alike. The shallow way to interpret that is to call Ruby a Smalltalk cover band. The more reasonable interpretation is that Smalltalk's closed system isolated it, while Ruby's participation in the Unix ecology and habit of appropriating features from every language under the sun gives it an infinitely gentler adoption curve and effortless integration with kickass tools like Git.

的确,语言非常相似。浅显的解释方法是把Ruby称为Smalltalk的封面乐队。更合理的解释是Smalltalk的封闭系统隔离了它,而Ruby对Unix生态系统的参与以及从每一种语言中获取特性的习惯给了它一个无限温和的采用曲线和与像Git这样的极具冲击力的工具的轻松集成。

Giles Bowkett

贾尔斯Bowkett

#6


17  

Guess who said this? (quote is close, maybe not exact): "I always thought Smalltalk would beat Java. I just didn't know if would be called 'Ruby' when it did so."

猜猜谁说呢?(引用很接近,可能不太准确):“我一直认为Smalltalk会胜过Java。我只是不知道它会不会被叫做“Ruby”。

Drum roll ....

鼓....滚

...

The answer is ... Kent Beck

答案是…Kent Beck

#7


15  

Stephane Ducasse has some great Smalltalk books available here:

Stephane Ducasse有一些很棒的Smalltalk书籍:

http://stephane.ducasse.free.fr/FreeBooks.html

http://stephane.ducasse.free.fr/FreeBooks.html

so although the Smalltalk community is not as prolific as the Ruby and Rails communities, there is still some great help out there.

因此,尽管Smalltalk社区并不像Ruby和Rails社区那样多产,但是仍然有一些很好的帮助。

#8


15  

what does Ruby have that Smalltalk doesn't?

Ruby有什么Smalltalk没有的呢?

  • Massive, current support by major platforms (IronRuby and jRuby) that enrich the set of libraries
  • 主要平台(IronRuby和jRuby)提供了大量的当前支持,丰富了库集
  • Evangelists like Dave Thomas who, for years, have been touring around the country preaching the gospel of their language. I have seen Dave at Java conferences stating he doesn't know Java and that he prefers Ruby.
  • 像戴夫·托马斯这样的传福音者,多年来一直在全国巡回宣传他们的语言。我在Java会议上见过Dave,他说他不懂Java,他更喜欢Ruby。
  • Strong, current real estate on the bookshelves
  • 强劲,当前房地产书架上
  • The creator of Ruby has said that he thinks about the programmer: Ruby's syntax seems to have this Zen appeal. It is hard to pin down, yet seems to galvanize the fans.
  • Ruby的创建者说他考虑程序员:Ruby的语法似乎有这种禅意。这很难确定,但似乎激励了球迷。
  • Creative, dynamic presentations like Giles and this one that gain mindshare
  • 像贾尔斯这样有创意的、有活力的演讲,以及这个能让人产生共鸣的演讲

I think your point is well-taken. As a friend once put it, Ruby might be "old wine in a new bottle" vis-a-vis Smalltalk. But sometimes the new bottle matters. A wine has to be in the right place at the right time.

我认为你的观点很有道理。正如一位朋友曾经说过的,Ruby可能是“新瓶装旧酒”。但有时新瓶子很重要。葡萄酒必须在合适的时间、合适的地点饮用。

#9


14  

Beats me. I spent a year checking out Ruby and doing some smallish projects to see how I liked it. I guess I'm a Smalltalk bigot because every time I'd sit down to work with Ruby I'd sigh and think "I'd really rather be doing this in Smalltalk". Finally I gave in and went back to Smalltalk. Now I'm happier. Happier is gooder.

难倒我了。我花了一年的时间检查Ruby,并做了一些小型的项目,看看我是如何喜欢它的。我想我是一个Smalltalk的偏见者,因为每次我坐下来和Ruby一起工作的时候,我都会叹气,想“我真的宁愿在Smalltalk里做这个”。最后我让步了,回到了Smalltalk。现在我更快乐。快乐的是更好的。

Which of course begs the question, "Why?". In no particular order:

这当然引出了一个问题:“为什么?”排名不分先后:

  1. Because the IDE blows away anything else I've ever worked with. This includes a bunch of platforms from ISPF on IBM mainframes to Microsoft's Visual (.*), include things such as Visual Basic 4-6, Visual C++ (various incarnations), Borland's Turbo Pascal and descendants (e.g. Delphi), and stuff on DEC machines in both character mode and under X-Windows.
  2. 因为IDE会把我工作过的任何东西都吹走。这包括从IBM大型机上的ISPF到微软的Visual(.*)的一系列平台,包括Visual Basic 4-6、Visual c++(各种化身)、Borland的Turbo Pascal和后人(例如Delphi),以及在DEC机器上的字符模式和X-Windows下的东西。
  3. Because the image is a beautiful place to live. I can find what I want in there. If I can't figure out how to do something I know that somewhere in the image is an example of what I'm trying to do - all I have to do is hunt until I find it. And it's self-documenting - if you want to see the details of how something works you just open a browser on the class you're interested in, look at the method, and that's how it works. (OK, eventually you'll hit something that calls a primitive, and then it's "here there be dragons", but it's usually understandable from context). It's possible to do similar things in Ruby/C++/C, but it's not as easy. Easy is better.
  4. 因为这是一个美丽的地方。我可以在里面找到我想要的。如果我不知道如何做某事,我知道在图片中的某个地方是我正在尝试做的一个例子——我所要做的就是寻找直到找到它。它是自我文档化的——如果你想了解一些东西是如何工作的细节,你只要在你感兴趣的类上打开一个浏览器,看看这个方法,它就是这样工作的。(好吧,最终你会碰到一个叫“原始”的东西,然后是“这里有龙”,但从上下文来看,这通常是可以理解的)。可以在Ruby/ c++ /C中做类似的事情,但这并不容易。简单越好。
  5. The language is minimal and consistent. Three kinds of messages - unary, binary, and keyword. That describes the priority of execution, too - unary messages first, then binary messages, then keyword messages. Use parentheses to help things out. Dang little syntax, really - it's all done with message sends. (OK, assignment isn't a message send, it's an operator. So's the 'return' operator (^). Blocks are enclosed by square brace pairs ([ ] ). Might be one or two other 'magic' bits in there, but darn little...).
  6. 语言是最小的和一致的。三种消息—一元消息、二进制消息和关键字消息。这也描述了执行的优先级——首先是一元消息,然后是二进制消息,然后是关键字消息。用括号来解决问题。小语法,真的——所有这些都是通过消息发送完成的。(好的,赋值不是发送消息,它是一个操作符。这样的“返回”操作符(^)。块被正方形的支撑对([])包围。里面可能还有一两处“魔法”,但该死的小……
  7. Blocks. Yeah, I know, they're there in Ruby (and others), but dang it, you literally can't program in Smalltalk without using them. You're forced to learn how to use them. Sometimes being forced is good.
  8. 块。是的,我知道,它们在Ruby(和其他语言)中存在,但该死的是,如果不使用它们,你就无法在Smalltalk中编程。你必须学会如何使用它们。有时候*是件好事。
  9. Object-oriented programming without compromise - or alternatives, for that matter. You can't pretend that you're "doing objects" while still doing the same old thing.
  10. 面向对象的编程,没有妥协——或者选择。你不能假装你在“做东西”,同时还在做同样的事情。
  11. Because it will stretch your brain. The comfortable constructs we've all gotten used to (if-then-else, do-while, for( ; ; ), etc) are no longer there so you have to Learn Something New. There are equivalents to all the above (and more), but you're going to have to learn to think differently. Differently is good.
  12. 因为它能伸展你的大脑。我们都习惯的舒适结构(if-then-else, do-while, for(;,),你已经不在那里了,所以你必须学习一些新的东西。以上这些都有相同之处(甚至更多),但你必须学会以不同的方式思考。不同的是好的。

On the other hand this may just be the ramblings of a guy who's been programming since the days when mainframes ruled the earth, we had to walk five miles to work through blinding snowstorms, uphill both ways, and computers used donuts for memory. I've got nothing against Ruby/Java/C/C++/, they're all useful in context, but give me Smalltalk or give me...well, maybe I should learn Lisp or Scheme or... :-)

另一方面,这可能只是一个自大型机统治地球以来就一直在编程的人的想法,我们必须走5英里才能穿越眩目的暴风雪,双向上坡,电脑用甜甜圈来记忆。我不反对Ruby/Java/C/ c++ /,它们在上下文中都很有用,但是请给我Smalltalk或者给我……也许我应该学Lisp或Scheme,或者……:-)

#10


11  

Smalltalk: people forwards ifTrue: [think] ifFalse: [not thinking]

Smalltalk:人们前进如果是真的:[想]ifFalse:[不思考]

Ruby: people think forwards unless thinking backwards

鲁比:人们总是向前看,除非他们回头看

1) Smalltalk's RPN-like control flow by messages is like Lisp - it's regular and cool but weirds people out.

1) Smalltalk的类rpn的消息控制流就像Lisp一样——它是常规的、很酷的,但是会让人感到奇怪。

2) Ruby lets people write code using the idiomatic way people speak - do blah unless there's a reason not to.

Ruby让人们用人们说话的惯用方式来写代码——除非有理由不这样做。

update rewrote the Smalltalk sample to actually be more legal code..

更新重写了Smalltalk示例,使之成为更合法的代码。

#11


8  

Ruby is the current buzz language. It's easier to market software built with it right now than a language developed in the 70s.

Ruby是当前的buzz语言。与70年代开发的一种语言相比,现在用它来推销软件要容易得多。

#12


8  

Community! Ruby and especially Rails has such a great community. When messing around with smalltalk it seemed that there were not as many screen casts, articles, blog posts, etc. written about Smalltalk.

社区!Ruby,尤其是Rails拥有如此强大的社区。在处理smalltalk时,似乎没有那么多关于smalltalk的屏幕显示、文章、博客等等。

#13


7  

You answered the question in your first line: "Ruby is becoming popular"

你在第一句回答了这个问题:“Ruby正在变得流行”

  • There are a lot of interesting modules, projects and such based around Ruby.
  • 有很多有趣的基于Ruby的模块和项目。
  • If you have trouble doing something in Ruby, it will be trivial to find help somewhere.
  • 如果您在Ruby中做一些事情有困难,那么在某个地方找到帮助是很简单的。
  • Ruby is installed on a lot of computers now (It's included by default on OS X, many Linux distros, and there are good installers for Windows) - I've not seen smalltalk installed by default on any machine I've used..
  • Ruby现在已经安装在许多计算机上(默认情况下,它包括在OS X上,许多Linux发行版上,并且有很好的Windows安装程序)——我还没有见过在我使用过的任何机器上默认安装smalltalk。

I would say wether or not one language is superior to another is irrelevant.. As an example, PHP may not be the "best" language ever, but I would still consider using it over Ruby on Rails (a "better" tool for creating websites) because it is so widespread.

我认为一种语言是否优于另一种语言是无关紧要的。例如,PHP可能不是“最好的”语言,但我仍然会考虑在Ruby on Rails(创建网站的“更好”工具)上使用它,因为它是如此广泛。

Basically, specific pros and cons of a language are far less important than everything surrounding it - namely the community.

基本上,一种语言的具体利弊远不如它周围的一切——即社区——重要得多。

#14


7  

Ruby (or any other language) is more popular than Smalltalk (or any other language) because we live in a chaotic universe. To wit:

Ruby(或任何其他语言)比Smalltalk(或任何其他语言)更受欢迎,因为我们生活在一个混乱的宇宙中。即:

  • From Dave Thomas himself, "[after the] video on 'How to Build a Blog in Ten Minutes'... Ruby went from being a nice little niche language, to being 'a language you wrote Rails apps in'" (Ruby Conference 2010 keynote).
  • 戴夫·托马斯(Dave Thomas)的《十分钟内建博客》(How to Build a Blog in Ten Minutes)视频之后……Ruby从一种很好的小众语言发展到“一种你在Ruby大会2010 keynote中编写Rails应用的语言”(Ruby Conference 2010 keynote)。
  • Early Smalltalk vendors charged prohibitively
  • 早期的Smalltalk供应商的收费非常高。
  • Smalltalk, because it was invented (ahead of its time) 30 years ago, occurs to many as an old, "dead" language (like FORTRAN)
  • Smalltalk(因为它是30年前发明的)在很多人看来是一种古老的“死”语言(比如FORTRAN)
  • corporations consider Smalltalk such a competitive advantage that they hide its use
  • 公司认为Smalltalk是一种竞争优势,所以他们隐瞒了它的用途

While the languages are similar in OO features, Smalltalk's killer advantage is the live, open environment (the much-misunderstood 'image'). After you check out this example of programming in Smalltalk, the debate is over.

尽管这些语言在OO特性上很相似,但Smalltalk的致命优势是实时的、开放的环境(常常被误解的“映像”)。在您查看Smalltalk中的这个编程示例之后,争论就结束了。

#15


5  

For me its not so much a case of what Ruby has, but what Ruby hasn't. And the thing that it doesn't have is the need for a VM and complete environment.

对我来说,这不是Ruby所拥有的,而是Ruby所没有的。它不需要VM和完整的环境。

Smalltalk is great - its where I learnt OO concepts, but for ease of use I go for Ruby. I can write Ruby code in my favourite editor and run it form the command line.

Smalltalk很好——它是我学习OO概念的地方,但是为了便于使用,我选择Ruby。我可以在我最喜欢的编辑器中编写Ruby代码,并在命令行中运行它。

So, for me, thats what I choose Ruby over Smalltalk.

所以,对我来说,这就是我选择Ruby而不是Smalltalk的原因。

#16


5  

I think everyone who has been working with Ruby for a while recognizes its deep debt to Smalltalk. As one of these people, what do I like about Ruby over Smalltalk? I think from a strictly language perspective, it's the sugar. Ruby is deliberately a very syntax-sugary language, whereas Smalltalk is a very syntax-minimal language. Ruby is essentially the Smalltalk object model with Perlish syntax sugar. I happen to like the sugar and find it makes programming more fun.

我想每个和Ruby一起工作过一段时间的人都认识到它对Smalltalk的巨大亏欠。作为这些人中的一员,我喜欢Ruby胜过Smalltalk的什么地方?我认为从严格的语言角度来看,是糖。Ruby是一种非常语法化的语言,而Smalltalk是一种语法最小化的语言。Ruby本质上是带有Perlish语法的Smalltalk对象模型。我碰巧喜欢这种糖,发现它能让编程更有趣。

#17


5  

You can find a job pretty easily doing Ruby. Although I really love Smalltalk, it's virtually impossible to get into the Smalltalk niche. There is work around in it, but if you didn't get in when it was popular it's virtually impossible now.

你可以很容易地找到做Ruby的工作。虽然我非常喜欢Smalltalk,但要进入Smalltalk的小众市场几乎是不可能的。里面有工作,但是如果你在它流行的时候没有进入,现在几乎是不可能的。

All the other reasons pale into insignificance because you need to spend plenty of time, focused on real work to learn a language properly. If you're not independently wealthy, the best way to do that is exposure to it at work.

所有其他的理由都显得无关紧要,因为你需要花大量的时间,专注于真正的工作来正确地学习一门语言。如果你不是一个独立的富人,那么最好的办法就是在工作中接触它。

#18


4  

Because Smalltalk distributions were priced in multiples of $1000USD whereas Ruby is free.

因为Smalltalk发行版的定价是1000美元的倍数,而Ruby是免费的。

#19


4  

Ruby is to Smalltalk as Arabic numerals are to Roman numerals. Same math, easier syntax.

Ruby是Smalltalk,因为阿拉伯数字是罗马数字。相同的数学、语法简单。

#20


3  

I've done a little Smalltalk - the IDE is one thing I remember - does Ruby have good IDE support?

我做了一个小小的Smalltalk—我记得IDE—Ruby有很好的IDE支持吗?

#21


3  

Use Ruby because it has might have business legs, Smalltalk doesn't.

使用Ruby是因为它可能有业务分支,而Smalltalk没有。

I can tell you from personal experience. Still using Smalltalk, love it, and have used a couple flavors. Although Smalltalk is a great language, and is everything you mentioned, you wont likely convince the average CIO/CTO to use Smalltalk on a new project. Of course, you might even have a hard time convincing a conservative CIO/CTO to use Ruby. In the end you have to be very careful if you want sustained long term commercial support and the ability to find off-the-street employees that can support your systems in the future. As an example, Smalltalk was a really big thing in the early 90's and IBM invested heavily into it in the late 90's. For IBM Smalltalk was going to be the next language for all business applications. IBM put Smalltalk on everything including their mainframe systems. Java became popular, took over the market, and Smalltalk became a niche player. Over a year ago IBM dumped the language (their term is sunset). Also, take a look at the History. ParkPlace and Digitalk where the first major commercial players in the Smalltalk arena, they merged and then went out of business.

我可以从个人经验告诉你。仍然使用Smalltalk,喜欢它,并且已经使用了一些风格。尽管Smalltalk是一种很好的语言,并且是您提到的所有内容,但是您不太可能说服普通的CIO/CTO在新项目中使用Smalltalk。当然,您甚至可能很难说服一个保守的CIO/CTO使用Ruby。最后,如果你想要长期的商业支持和找到能够在未来支持你的系统的非专业员工的能力,你必须非常小心。例如,Smalltalk在90年代早期是一件大事IBM在90年代后期投入了大量资金。对于IBM来说,Smalltalk将成为所有业务应用程序的下一种语言。IBM将Smalltalk应用于所有东西,包括他们的大型机系统。Java变得流行起来,占领了市场,Smalltalk成为了一个利基市场。一年多前,IBM抛弃了这门语言(他们的术语是sunset)。还有,看看历史。ParkPlace和Digitalk是Smalltalk领域的第一批主要商业参与者,他们合并后就倒闭了。

#22


2  

I love both Smalltalk and Ruby - but have found that Ruby is more applicable to what I do daily, and is closer to my heart (practically speaking). What does Ruby offer that Smalltalk doesn't?

我喜欢Smalltalk和Ruby——但是我发现Ruby更适合我每天的工作,而且更贴近我的内心(实际上是这样)。Ruby提供了Smalltalk没有的什么?

  • Text-based scripting
  • 基于文本的脚本
  • Low implementation requirements (runs in more places)
  • 低实现需求(在更多地方运行)
  • Easier to learn and justify (Perl and Python programmers will have no trouble
  • 更容易学习和证明(Perl和Python程序员不会有麻烦)。
  • Easier to move programs around - text files!
  • 更容易移动程序周围-文本文件!
  • Interfaces well with native environment
  • 与本机环境的良好接口
  • Anywhere Java runs, jRuby runs...
  • Java运行的任何地方,jRuby都在运行……
  • Bigger and much more active community
  • 更大更活跃的社区

Some have mentioned gst (GNU Smalltalk); the problems still hold.

有人提到gst (GNU Smalltalk);仍持有的问题。

#23


2  

Use whatever makes you more powerful and faster to beat your challenge.

用任何能让你更强大、更快的方法来战胜挑战。

For us, a little in house framework, we built in top of seaside is really our superpower.

对我们来说,在房子的框架里,我们在海边建造的是我们真正的超级力量。

I love the RoR community, it has the right attitude. That's very very valuable. But at the same time, technologically, seaside makes you stronger against more complicated problems.

我喜欢RoR社区,它有正确的态度。这是非常宝贵的。但与此同时,从技术上讲,seaside使您在更复杂的问题上变得更加强大。

You can do great seaside web apps using open-source stuff.

你可以使用开源软件做一些很棒的海边网络应用。

dabbledb was a sartup based on seaside and, hey! Avi sold it to twitter in june this year!

dabbledb是一个基于seaside的sartup网站,嘿!今年6月,阿维将它卖给了twitter !

I say you don't need to wait for others to approve your initiative.

我说你不需要等别人批准你的计划。

Just go for it. Make it done. Show us that works.

就试试吧。让它做。展示我们的作品。

You're not alone. We are on the same boat.

你不是一个人。我们在同一条船上。

#24


2  

Interesting perspective from Robert Martin (from RailsConf 2009): "What Killed Smalltalk Could Kill Ruby, Too"

Robert Martin的有趣观点(来自RailsConf 2009):“杀死Smalltalk的东西也可能杀死Ruby。”

#25


0  

I think part of the problem is the development-environment-is-the-runtime. This gives a lot of power, but it also presents a larger learning curve.

我认为部分问题在于开发环境——即运行时。这提供了很多力量,但它也提供了更大的学习曲线。

Here is a hello world tutorial.

这里是hello world教程。

This is very different from other languages where I just need to know how to open a text editor and copy and paste text, hit save, and run a compiler. I HAVE to know how to use the environment. That tutorial doesn't even show me how to create a basic program (which is likely more a fault of that tutorial) that I can run.

这与其他语言非常不同,我只需要知道如何打开文本编辑器、复制和粘贴文本、单击save和运行编译器。我必须知道如何使用环境。该教程甚至没有告诉我如何创建一个我可以运行的基本程序(这很可能是该教程的错误)。

There is definately a higher cost of just getting things going than most other languages.

毫无疑问,与大多数其他语言相比,让事情顺利进行的成本更高。

Most languages have some nice eye-catching code that they can show off. I haven't seen that with Smalltalk. I also think that there is some stigma to Smalltalk because it has been around so long and it is still relatively obscure.

大多数语言都有一些吸引人眼球的代码,我还没有见过Smalltalk。我也认为Smalltalk存在着一些耻辱,因为它已经存在了很长时间,而且它仍然是相对模糊的。

#26


0  

I think the BIGGEST difference is that Ruby is much more similar to perl in terms of USEAGE. Smalltalk never got a foothold into the "scripting" languages.

我认为最大的区别在于Ruby在使用方面更类似于perl。Smalltalk从未在“脚本”语言中立足。

The VM is really cool and I hope ruby will have something similar to it so we can treat everything on our OS that is written in ruby as object in memory space, however until then I simply enjoy Ruby's terse, short syntax, the ability to just write a tiny script and reuse it later. Ruby got all the advantages of perl and the OOP is much more similar to smalltalk than perl's OOP hack.

ruby VM真的很酷,我希望会有类似于我们可以治疗一切对我们的操作系统是用ruby编写的对象在内存空间,但在此之前我只是享受ruby的简洁,短的语法,只写一个小脚本和重用的能力。Ruby获得了perl的所有优点,OOP比perl的OOP hack更类似于smalltalk。

#27


0  

I would go further than Jonke's answer, and say there are now a large number of languages that have a very strong community, almost enough to suit every taste, and a subset of these have mainstream recognition (i.e. your manager will let you use them at work as well).

我想比Jonke的答案更进一步,我想说,现在有很多语言都有很强的社区,几乎足以满足每个人的口味,其中有一部分语言是主流认可的(也就是说,你的经理也会让你在工作中使用它们)。

It's easy to learn the basics of a language, but to actually use it effectively you need to invest enough time to learn the platform and the tools, as well as the syntax and the idioms. IIRC, McConnell claims that it takes about three years to become truly proficient.

学习一门语言的基础知识很容易,但是要真正有效地使用它,您需要投入足够的时间来学习平台和工具,以及语法和习语。麦康奈尔声称,要真正精通IIRC,大约需要三年的时间。

Given those things, it's hard to justify spending a lot of time on languages like LISP and Smalltalk, although they are interesting and perhaps educational to look at.

考虑到这些因素,花大量时间在LISP和Smalltalk这样的语言上是很困难的,尽管它们很有趣,也很有教育意义。

#28


0  

As a latecomer to discussion, the main problem with Smalltalk and Lisp is that you can't run them with CGI or FastCGI on shared hosting.

作为讨论的后来者,Smalltalk和Lisp的主要问题是不能在共享主机上使用CGI或FastCGI运行它们。

The unwashed masses are never going to use them if they need VPS or dedicated servers to use them. IMHO Seaside is superior to almost anything out ther, but will it run on Dreamhost or Webfaction?

如果需要VPS或专用服务器来使用它们,这些未清洗的群众永远不会使用它们。IMHO Seaside比其他任何东西都优越,但它会在Dreamhost还是web敌视中运行?

#1


87  

I'm more of a Pythonista than a Ruby user, however the same things hold for Ruby for much the same reasons.

我比Ruby用户更喜欢python,但是同样的事情也有同样的原因。

  • The architecture of Smalltalk is somewhat insular whereas Python and Ruby were built from the ground up to facilitate integration. Smalltalk never really gained a body of hybrid application support in the way that Python and Ruby have, so the concept of 'smalltalk as embedded scripting language' never caught on.

    As an aside, Java was not the easiest thing to interface with other code bases (JNI is fairly clumsy), but that did not stop it from gaining mindshare. IMO the interfacing argument is significant - ease of embedding hasn't hurt Python - but this argument only holds moderate weight as not all applications require this capability. Also, later versions of Smalltalk did substantially address the insularity.

    Smalltalk的体系结构有些孤立,而Python和Ruby则是从底层构建的,以便于集成。Smalltalk从未像Python和Ruby那样获得大量的混合应用程序支持,因此“Smalltalk作为嵌入式脚本语言”的概念从未流行起来。顺便提一下,Java并不是与其他代码库进行接口的最简单的东西(JNI相当笨拙),但这并没有阻止它获得关注。在我看来,接口参数很重要——易于嵌入不会损害Python——但是这个参数只具有一定的分量,因为不是所有应用程序都需要这个功能。而且,后来的Smalltalk版本确实很大程度上解决了岛国性质。

  • The class library of most of the main smalltalk implementations (VisualWorks, VisualAge etc.) was large and had reputation for a fairly steep learning curve. Most key functionality in Smalltalk is hidden away somewhere in the class library, even basic stuff like streams and collections. The language paradigm is also something of a culture shock for someone not familiar with it, and the piecemeal view of the program presented by the browser is quite different to what most people were used to.

    The overall effect is that Smalltalk got a (somewhat deserved) reputation for being difficult to learn; it takes quite a bit of time and effort to become a really proficient Smalltalk programmer. Ruby and Python are much easier to learn and to bring new programmers up to speed with.

    大多数主要smalltalk实现(VisualWorks、VisualAge等)的类库很大,并且以相当陡峭的学习曲线著称。Smalltalk中的大多数关键功能都隐藏在类库中的某个地方,甚至是流和集合之类的基本内容。对于不熟悉语言的人来说,语言范式也是一种文化冲击,浏览器呈现的程序的零碎视图与大多数人所习惯的非常不同。总体的影响是Smalltalk因难学而获得了(多少是应得的)声誉;要成为一个真正精通Smalltalk的程序员需要花费相当多的时间和精力。Ruby和Python更容易学习,也更容易让新的程序员跟上速度。

  • Historically, mainstream Smalltalk implementations were quite expensive and needed exotic hardware to run, as can be seen this net.lang.st80 posting from 1983. Windows 3.1, NT and '95 and OS/2 were the first mass market operating systems on mainstream hardware capable of supporting a Smalltalk implementation with decent native system integration. Previously, Mac or workstation hardware were the cheapest platforms capable of running Smalltalk effectively. Some implementations (particularly Digitalk) supported PC operating systems quite well and did succeed in gaining some traction.

    However, OS/2 was never that successful and Windows did not achieve mainstream acceptance until the mid 1990s. Unfortunately this coincided with the rise of the Web as a platform and a large marketing push behind Java. Java grabbed most of the mindshare in the latter part of the 1990s, rendering Smalltalk a bit of an also-ran.

    从历史上看,主流的Smalltalk实现非常昂贵,并且需要奇异的硬件来运行,可以看到这个net.lang。st80发布于1983年。Windows 3.1、NT和'95和OS/2是第一个主流硬件上的大众市场操作系统,能够支持Smalltalk实现,并具有良好的本地系统集成。以前,Mac或工作站硬件是能够有效运行Smalltalk的最便宜的平台。有些实现(特别是Digitalk)支持PC操作系统非常好,而且确实获得了一些关注。然而,OS/2从未如此成功,Windows直到90年代中期才被主流接受。不幸的是,与此同时,Web作为一个平台的崛起和Java背后巨大的市场推动。Java在上世纪90年代后期占据了大部分市场份额,使得Smalltalk有点落俗套。

  • Ruby and Python work in a more conventional toolchain and are not tightly coupled to a specific development environment. While the Smalltalk IDEs I have used are nice enough I use PythonWin for Python development largely because it has a nice editor with syntax highlighting and doesn't get underfoot.

    However, Smalltalk is was designed to be used with an IDE (in fact, Smalltalk was the original graphical IDE) and still has some nice features not replicated by other systems. Testing code with highlight and 'Show it' is still a very nice feature that I have never seen in a Python IDE, although I can't speak for Ruby.

    Ruby和Python在更传统的工具链中工作,并且没有与特定的开发环境紧密耦合。虽然我所使用的Smalltalk ide已经足够好了,但我在Python开发中使用PythonWin主要是因为它有一个很好的编辑器,具有语法高亮显示,并且不会在底层使用。然而,Smalltalk被设计成与IDE一起使用(实际上,Smalltalk是最初的图形化IDE),并且仍然有一些其他系统没有复制的优秀特性。用突出显示和“Show it”测试代码仍然是一个非常好的特性,这是我在Python IDE中从未见过的,尽管我不能代表Ruby。

  • Smalltalk was somewhat late coming to the web application party. Early efforts such as VisualWave were never terribly successful and it was not until Seaside came out that a decent web framework got acceptance in Smalltalk circles. In the meantime Java EE has had a complete acceptance lifecycle starting with raving fanboys promoting it and finally getting bored and moving onto Ruby ;-}

    Ironically, Seaside is starting to get a bit of mindshare among the cognoscenti so we may find that Smalltalk rides that cycle back into popularity.

    Smalltalk在web应用程序方面有点晚了。像VisualWave这样的早期工作从来都不是非常成功,而且直到Seaside一种像样的web框架才被Smalltalk圈子所接受。同时Java EE已经完全接受生命周期开始疯狂粉丝促进它,最后变得无聊和移动到Ruby;- }具有讽刺意味的是,海滨开始有点思想的专家,所以我们可能会发现,Smalltalk骑回循环流行。

Having said that, Smalltalk is a very nice system once you've worked out how to drive it.

说到这里,Smalltalk是一个非常好的系统,一旦你找到了如何驱动它。

#2


77  

When I leave my house in the morning to go to work, I often struggle with the decision to make a left or right turn out of my drive way (I live in the middle of a street). Either way will get me to my destination. One way leads me to the highway which, depending on traffic, will probably get me to the office the quickest. I get to drive very fast for at least part of the way and I have a good chance of seeing a pretty girl or two on their way to work :-)

当我早上离开家去上班的时候,我经常纠结于从我的车道上向左拐还是向右拐(我住在马路中间)。任何一种方式都能让我到达目的地。有一条路可以把我带到高速公路上,根据交通状况,这条高速公路可能会最快地把我送到办公室。我开车很快,至少在路上开了一段时间,我很有可能在上班的路上看到一两个漂亮姑娘。

The other way allows me to travel down a very enchanting, windy back road with complete tree cover. That path is quite enjoyable and of the two approaches is definitely the more fun, though it means that I will get to the office later than I would have had I taken the highway. Each way has its merits. On days that I am in a big hurry, I will usually take the highway though I may run into traffic and I also increase my chances of getting into an accident (if I am not careful in my haste). Other days I may choose the woody path and be driving along, enjoying the scenery and realize that I am running late. I may try to speed up, raising my chances of getting a ticket or causing an accident myself.

另一种方式是让我沿着一个非常迷人的,有风的,有完整的树罩的路走下去。这条路很有趣,而且这两种方式绝对更有趣,尽管这意味着我要比走高速公路晚到办公室。每种方法都有其优点。在急急忙忙的日子里,我通常会选择高速公路,虽然我可能会遇到交通堵塞,而且我也增加了发生事故的机会(如果我在匆忙中不小心的话)。有时,我可能会选择树林里的小路,开着车,欣赏风景,然后意识到我要迟到了。我可能会试着加快速度,增加我获得罚单的机会,或者自己造成事故。

Neither way is better than the other. They each have their benefits and risks, and each will get me to my goal.

两种方法都不如另一种。他们每个人都有各自的好处和风险,每个人都能让我达到我的目标。

#3


25  

I think your question is somewhat missing the point. You shouldn't choose, you should learn them both!

我认为你的问题有点不切题。你不应该选择,你应该同时学习它们!

If you truly are in a position that you can choose the next framework(vm, infrastructure) then you need to decided what to use and can ask a specific question with pros and cons from the perspective of what your application is inteded to do.

如果您确实能够选择下一个框架(vm、基础设施),那么您需要决定使用什么,并可以从应用程序要做什么的角度,提出一个带有正反两面的具体问题。

I have used smalltalk (love it) and ruby (love it).

我用过smalltalk(喜欢它)和ruby(喜欢它)。

At home or for open source project I can use every language I like, but when doing work I have to adopt.

在家里或者在开源项目中,我可以使用我喜欢的每一种语言,但是在做工作时,我必须采用。

I started to use ruby (at work) because we needed some scripting language that behaved more-or-less equally under solaris,linux and windows(98,2000,xp). Ruby was at that time unknown to average-joe and there didn't exist any rails. But it was easy to sell to everyone involved.

我开始使用ruby(在工作中),因为我们需要一些脚本语言,这些语言在solaris、linux和windows(98,2000,xp)下大致相同。Ruby在那个时候并不为人所知,joe也不存在任何rails。但向所有相关人士推销产品很容易。

(Why not python? the truth ? I once spend a week hunting for a bug that happened when a terminal converted my space to a tab and the intending got messed up).

(为什么不python呢?真相?有一次,我花了一个星期的时间去寻找一个bug,这个bug发生在一个终端将我的空间转换成一个标签,而“意想”被搞砸的时候。

So people started to code more and more in ruby because it was so relaxing, enjoying and not a cloud on the sky.

所以人们开始在ruby中编写越来越多的代码,因为它让人放松,享受,而不是天上的云。

Paul Graham sums it up

Paul Graham总结道

It's true, certainly, that most people don't choose programming languages simply based on their merits. Most programmers are told what language to use by someone else.

当然,大多数人选择编程语言并不仅仅是基于他们的优点。大多数程序员被告知其他人应该使用哪种语言。

and

To be attractive to hackers, a language must be good for writing the kinds of programs they want to write. And that means, perhaps surprisingly, that it has to be good for writing throwaway programs.

要吸引黑客,语言必须适合编写他们想要编写的程序。这意味着,或许令人惊讶的是,它必须适合编写一次性程序。

And when were at the Lisp land try to replace LISP with smalltalk

当我们在Lisp的土地上尝试用smalltalk取代Lisp

Ruby’s libraries, community, and momentum are good

Ruby的库、社区和动力都很好

So if LISP is still more powerful than Ruby, why not use LISP? The typical objections to programming in LISP are:

因此,如果LISP比Ruby更强大,为什么不使用LISP呢?对LISP编程的典型反对是:

  1. There aren’t enough libraries.
  2. 没有足够的库。
  3. We can’t hire LISP programmers.
  4. 我们不能雇佣LISP程序员。
  5. LISP has gone nowhere in the past 20 years.
  6. LISP在过去20年里毫无进展。

These aren’t overwhelming objections, but they’re certainly worth considering.

这些并不是压倒性的反对意见,但它们确实值得考虑。

and

Now, given a choice between a powerful language, and popular language, it may make excellent sense to pick the powerful one. But if the difference in power is minor, being popular has all sorts of nice advantages. In 2005, I’d think long and hard before choosing LISP over Ruby. I’d probably only do it if I needed optimized code, or macros which acted as full-fledged compilers.

现在,如果让我们在一种强大的语言和流行的语言之间做出选择,那么选择一种强大的语言可能是非常有意义的。但如果权力的差别不大,受欢迎有各种各样的好处。在2005年,在选择LISP而不是Ruby之前,我想了很久。我可能只在需要优化代码或作为成熟编译器的宏时才会这样做。

#4


22  

I would say the opposite: Smalltalk syntax is one of the simplest and powerful programming language syntaxes.

相反,Smalltalk语法是最简单、最强大的编程语言语法之一。

#5


19  

It's true the languages are very much alike. The shallow way to interpret that is to call Ruby a Smalltalk cover band. The more reasonable interpretation is that Smalltalk's closed system isolated it, while Ruby's participation in the Unix ecology and habit of appropriating features from every language under the sun gives it an infinitely gentler adoption curve and effortless integration with kickass tools like Git.

的确,语言非常相似。浅显的解释方法是把Ruby称为Smalltalk的封面乐队。更合理的解释是Smalltalk的封闭系统隔离了它,而Ruby对Unix生态系统的参与以及从每一种语言中获取特性的习惯给了它一个无限温和的采用曲线和与像Git这样的极具冲击力的工具的轻松集成。

Giles Bowkett

贾尔斯Bowkett

#6


17  

Guess who said this? (quote is close, maybe not exact): "I always thought Smalltalk would beat Java. I just didn't know if would be called 'Ruby' when it did so."

猜猜谁说呢?(引用很接近,可能不太准确):“我一直认为Smalltalk会胜过Java。我只是不知道它会不会被叫做“Ruby”。

Drum roll ....

鼓....滚

...

The answer is ... Kent Beck

答案是…Kent Beck

#7


15  

Stephane Ducasse has some great Smalltalk books available here:

Stephane Ducasse有一些很棒的Smalltalk书籍:

http://stephane.ducasse.free.fr/FreeBooks.html

http://stephane.ducasse.free.fr/FreeBooks.html

so although the Smalltalk community is not as prolific as the Ruby and Rails communities, there is still some great help out there.

因此,尽管Smalltalk社区并不像Ruby和Rails社区那样多产,但是仍然有一些很好的帮助。

#8


15  

what does Ruby have that Smalltalk doesn't?

Ruby有什么Smalltalk没有的呢?

  • Massive, current support by major platforms (IronRuby and jRuby) that enrich the set of libraries
  • 主要平台(IronRuby和jRuby)提供了大量的当前支持,丰富了库集
  • Evangelists like Dave Thomas who, for years, have been touring around the country preaching the gospel of their language. I have seen Dave at Java conferences stating he doesn't know Java and that he prefers Ruby.
  • 像戴夫·托马斯这样的传福音者,多年来一直在全国巡回宣传他们的语言。我在Java会议上见过Dave,他说他不懂Java,他更喜欢Ruby。
  • Strong, current real estate on the bookshelves
  • 强劲,当前房地产书架上
  • The creator of Ruby has said that he thinks about the programmer: Ruby's syntax seems to have this Zen appeal. It is hard to pin down, yet seems to galvanize the fans.
  • Ruby的创建者说他考虑程序员:Ruby的语法似乎有这种禅意。这很难确定,但似乎激励了球迷。
  • Creative, dynamic presentations like Giles and this one that gain mindshare
  • 像贾尔斯这样有创意的、有活力的演讲,以及这个能让人产生共鸣的演讲

I think your point is well-taken. As a friend once put it, Ruby might be "old wine in a new bottle" vis-a-vis Smalltalk. But sometimes the new bottle matters. A wine has to be in the right place at the right time.

我认为你的观点很有道理。正如一位朋友曾经说过的,Ruby可能是“新瓶装旧酒”。但有时新瓶子很重要。葡萄酒必须在合适的时间、合适的地点饮用。

#9


14  

Beats me. I spent a year checking out Ruby and doing some smallish projects to see how I liked it. I guess I'm a Smalltalk bigot because every time I'd sit down to work with Ruby I'd sigh and think "I'd really rather be doing this in Smalltalk". Finally I gave in and went back to Smalltalk. Now I'm happier. Happier is gooder.

难倒我了。我花了一年的时间检查Ruby,并做了一些小型的项目,看看我是如何喜欢它的。我想我是一个Smalltalk的偏见者,因为每次我坐下来和Ruby一起工作的时候,我都会叹气,想“我真的宁愿在Smalltalk里做这个”。最后我让步了,回到了Smalltalk。现在我更快乐。快乐的是更好的。

Which of course begs the question, "Why?". In no particular order:

这当然引出了一个问题:“为什么?”排名不分先后:

  1. Because the IDE blows away anything else I've ever worked with. This includes a bunch of platforms from ISPF on IBM mainframes to Microsoft's Visual (.*), include things such as Visual Basic 4-6, Visual C++ (various incarnations), Borland's Turbo Pascal and descendants (e.g. Delphi), and stuff on DEC machines in both character mode and under X-Windows.
  2. 因为IDE会把我工作过的任何东西都吹走。这包括从IBM大型机上的ISPF到微软的Visual(.*)的一系列平台,包括Visual Basic 4-6、Visual c++(各种化身)、Borland的Turbo Pascal和后人(例如Delphi),以及在DEC机器上的字符模式和X-Windows下的东西。
  3. Because the image is a beautiful place to live. I can find what I want in there. If I can't figure out how to do something I know that somewhere in the image is an example of what I'm trying to do - all I have to do is hunt until I find it. And it's self-documenting - if you want to see the details of how something works you just open a browser on the class you're interested in, look at the method, and that's how it works. (OK, eventually you'll hit something that calls a primitive, and then it's "here there be dragons", but it's usually understandable from context). It's possible to do similar things in Ruby/C++/C, but it's not as easy. Easy is better.
  4. 因为这是一个美丽的地方。我可以在里面找到我想要的。如果我不知道如何做某事,我知道在图片中的某个地方是我正在尝试做的一个例子——我所要做的就是寻找直到找到它。它是自我文档化的——如果你想了解一些东西是如何工作的细节,你只要在你感兴趣的类上打开一个浏览器,看看这个方法,它就是这样工作的。(好吧,最终你会碰到一个叫“原始”的东西,然后是“这里有龙”,但从上下文来看,这通常是可以理解的)。可以在Ruby/ c++ /C中做类似的事情,但这并不容易。简单越好。
  5. The language is minimal and consistent. Three kinds of messages - unary, binary, and keyword. That describes the priority of execution, too - unary messages first, then binary messages, then keyword messages. Use parentheses to help things out. Dang little syntax, really - it's all done with message sends. (OK, assignment isn't a message send, it's an operator. So's the 'return' operator (^). Blocks are enclosed by square brace pairs ([ ] ). Might be one or two other 'magic' bits in there, but darn little...).
  6. 语言是最小的和一致的。三种消息—一元消息、二进制消息和关键字消息。这也描述了执行的优先级——首先是一元消息,然后是二进制消息,然后是关键字消息。用括号来解决问题。小语法,真的——所有这些都是通过消息发送完成的。(好的,赋值不是发送消息,它是一个操作符。这样的“返回”操作符(^)。块被正方形的支撑对([])包围。里面可能还有一两处“魔法”,但该死的小……
  7. Blocks. Yeah, I know, they're there in Ruby (and others), but dang it, you literally can't program in Smalltalk without using them. You're forced to learn how to use them. Sometimes being forced is good.
  8. 块。是的,我知道,它们在Ruby(和其他语言)中存在,但该死的是,如果不使用它们,你就无法在Smalltalk中编程。你必须学会如何使用它们。有时候*是件好事。
  9. Object-oriented programming without compromise - or alternatives, for that matter. You can't pretend that you're "doing objects" while still doing the same old thing.
  10. 面向对象的编程,没有妥协——或者选择。你不能假装你在“做东西”,同时还在做同样的事情。
  11. Because it will stretch your brain. The comfortable constructs we've all gotten used to (if-then-else, do-while, for( ; ; ), etc) are no longer there so you have to Learn Something New. There are equivalents to all the above (and more), but you're going to have to learn to think differently. Differently is good.
  12. 因为它能伸展你的大脑。我们都习惯的舒适结构(if-then-else, do-while, for(;,),你已经不在那里了,所以你必须学习一些新的东西。以上这些都有相同之处(甚至更多),但你必须学会以不同的方式思考。不同的是好的。

On the other hand this may just be the ramblings of a guy who's been programming since the days when mainframes ruled the earth, we had to walk five miles to work through blinding snowstorms, uphill both ways, and computers used donuts for memory. I've got nothing against Ruby/Java/C/C++/, they're all useful in context, but give me Smalltalk or give me...well, maybe I should learn Lisp or Scheme or... :-)

另一方面,这可能只是一个自大型机统治地球以来就一直在编程的人的想法,我们必须走5英里才能穿越眩目的暴风雪,双向上坡,电脑用甜甜圈来记忆。我不反对Ruby/Java/C/ c++ /,它们在上下文中都很有用,但是请给我Smalltalk或者给我……也许我应该学Lisp或Scheme,或者……:-)

#10


11  

Smalltalk: people forwards ifTrue: [think] ifFalse: [not thinking]

Smalltalk:人们前进如果是真的:[想]ifFalse:[不思考]

Ruby: people think forwards unless thinking backwards

鲁比:人们总是向前看,除非他们回头看

1) Smalltalk's RPN-like control flow by messages is like Lisp - it's regular and cool but weirds people out.

1) Smalltalk的类rpn的消息控制流就像Lisp一样——它是常规的、很酷的,但是会让人感到奇怪。

2) Ruby lets people write code using the idiomatic way people speak - do blah unless there's a reason not to.

Ruby让人们用人们说话的惯用方式来写代码——除非有理由不这样做。

update rewrote the Smalltalk sample to actually be more legal code..

更新重写了Smalltalk示例,使之成为更合法的代码。

#11


8  

Ruby is the current buzz language. It's easier to market software built with it right now than a language developed in the 70s.

Ruby是当前的buzz语言。与70年代开发的一种语言相比,现在用它来推销软件要容易得多。

#12


8  

Community! Ruby and especially Rails has such a great community. When messing around with smalltalk it seemed that there were not as many screen casts, articles, blog posts, etc. written about Smalltalk.

社区!Ruby,尤其是Rails拥有如此强大的社区。在处理smalltalk时,似乎没有那么多关于smalltalk的屏幕显示、文章、博客等等。

#13


7  

You answered the question in your first line: "Ruby is becoming popular"

你在第一句回答了这个问题:“Ruby正在变得流行”

  • There are a lot of interesting modules, projects and such based around Ruby.
  • 有很多有趣的基于Ruby的模块和项目。
  • If you have trouble doing something in Ruby, it will be trivial to find help somewhere.
  • 如果您在Ruby中做一些事情有困难,那么在某个地方找到帮助是很简单的。
  • Ruby is installed on a lot of computers now (It's included by default on OS X, many Linux distros, and there are good installers for Windows) - I've not seen smalltalk installed by default on any machine I've used..
  • Ruby现在已经安装在许多计算机上(默认情况下,它包括在OS X上,许多Linux发行版上,并且有很好的Windows安装程序)——我还没有见过在我使用过的任何机器上默认安装smalltalk。

I would say wether or not one language is superior to another is irrelevant.. As an example, PHP may not be the "best" language ever, but I would still consider using it over Ruby on Rails (a "better" tool for creating websites) because it is so widespread.

我认为一种语言是否优于另一种语言是无关紧要的。例如,PHP可能不是“最好的”语言,但我仍然会考虑在Ruby on Rails(创建网站的“更好”工具)上使用它,因为它是如此广泛。

Basically, specific pros and cons of a language are far less important than everything surrounding it - namely the community.

基本上,一种语言的具体利弊远不如它周围的一切——即社区——重要得多。

#14


7  

Ruby (or any other language) is more popular than Smalltalk (or any other language) because we live in a chaotic universe. To wit:

Ruby(或任何其他语言)比Smalltalk(或任何其他语言)更受欢迎,因为我们生活在一个混乱的宇宙中。即:

  • From Dave Thomas himself, "[after the] video on 'How to Build a Blog in Ten Minutes'... Ruby went from being a nice little niche language, to being 'a language you wrote Rails apps in'" (Ruby Conference 2010 keynote).
  • 戴夫·托马斯(Dave Thomas)的《十分钟内建博客》(How to Build a Blog in Ten Minutes)视频之后……Ruby从一种很好的小众语言发展到“一种你在Ruby大会2010 keynote中编写Rails应用的语言”(Ruby Conference 2010 keynote)。
  • Early Smalltalk vendors charged prohibitively
  • 早期的Smalltalk供应商的收费非常高。
  • Smalltalk, because it was invented (ahead of its time) 30 years ago, occurs to many as an old, "dead" language (like FORTRAN)
  • Smalltalk(因为它是30年前发明的)在很多人看来是一种古老的“死”语言(比如FORTRAN)
  • corporations consider Smalltalk such a competitive advantage that they hide its use
  • 公司认为Smalltalk是一种竞争优势,所以他们隐瞒了它的用途

While the languages are similar in OO features, Smalltalk's killer advantage is the live, open environment (the much-misunderstood 'image'). After you check out this example of programming in Smalltalk, the debate is over.

尽管这些语言在OO特性上很相似,但Smalltalk的致命优势是实时的、开放的环境(常常被误解的“映像”)。在您查看Smalltalk中的这个编程示例之后,争论就结束了。

#15


5  

For me its not so much a case of what Ruby has, but what Ruby hasn't. And the thing that it doesn't have is the need for a VM and complete environment.

对我来说,这不是Ruby所拥有的,而是Ruby所没有的。它不需要VM和完整的环境。

Smalltalk is great - its where I learnt OO concepts, but for ease of use I go for Ruby. I can write Ruby code in my favourite editor and run it form the command line.

Smalltalk很好——它是我学习OO概念的地方,但是为了便于使用,我选择Ruby。我可以在我最喜欢的编辑器中编写Ruby代码,并在命令行中运行它。

So, for me, thats what I choose Ruby over Smalltalk.

所以,对我来说,这就是我选择Ruby而不是Smalltalk的原因。

#16


5  

I think everyone who has been working with Ruby for a while recognizes its deep debt to Smalltalk. As one of these people, what do I like about Ruby over Smalltalk? I think from a strictly language perspective, it's the sugar. Ruby is deliberately a very syntax-sugary language, whereas Smalltalk is a very syntax-minimal language. Ruby is essentially the Smalltalk object model with Perlish syntax sugar. I happen to like the sugar and find it makes programming more fun.

我想每个和Ruby一起工作过一段时间的人都认识到它对Smalltalk的巨大亏欠。作为这些人中的一员,我喜欢Ruby胜过Smalltalk的什么地方?我认为从严格的语言角度来看,是糖。Ruby是一种非常语法化的语言,而Smalltalk是一种语法最小化的语言。Ruby本质上是带有Perlish语法的Smalltalk对象模型。我碰巧喜欢这种糖,发现它能让编程更有趣。

#17


5  

You can find a job pretty easily doing Ruby. Although I really love Smalltalk, it's virtually impossible to get into the Smalltalk niche. There is work around in it, but if you didn't get in when it was popular it's virtually impossible now.

你可以很容易地找到做Ruby的工作。虽然我非常喜欢Smalltalk,但要进入Smalltalk的小众市场几乎是不可能的。里面有工作,但是如果你在它流行的时候没有进入,现在几乎是不可能的。

All the other reasons pale into insignificance because you need to spend plenty of time, focused on real work to learn a language properly. If you're not independently wealthy, the best way to do that is exposure to it at work.

所有其他的理由都显得无关紧要,因为你需要花大量的时间,专注于真正的工作来正确地学习一门语言。如果你不是一个独立的富人,那么最好的办法就是在工作中接触它。

#18


4  

Because Smalltalk distributions were priced in multiples of $1000USD whereas Ruby is free.

因为Smalltalk发行版的定价是1000美元的倍数,而Ruby是免费的。

#19


4  

Ruby is to Smalltalk as Arabic numerals are to Roman numerals. Same math, easier syntax.

Ruby是Smalltalk,因为阿拉伯数字是罗马数字。相同的数学、语法简单。

#20


3  

I've done a little Smalltalk - the IDE is one thing I remember - does Ruby have good IDE support?

我做了一个小小的Smalltalk—我记得IDE—Ruby有很好的IDE支持吗?

#21


3  

Use Ruby because it has might have business legs, Smalltalk doesn't.

使用Ruby是因为它可能有业务分支,而Smalltalk没有。

I can tell you from personal experience. Still using Smalltalk, love it, and have used a couple flavors. Although Smalltalk is a great language, and is everything you mentioned, you wont likely convince the average CIO/CTO to use Smalltalk on a new project. Of course, you might even have a hard time convincing a conservative CIO/CTO to use Ruby. In the end you have to be very careful if you want sustained long term commercial support and the ability to find off-the-street employees that can support your systems in the future. As an example, Smalltalk was a really big thing in the early 90's and IBM invested heavily into it in the late 90's. For IBM Smalltalk was going to be the next language for all business applications. IBM put Smalltalk on everything including their mainframe systems. Java became popular, took over the market, and Smalltalk became a niche player. Over a year ago IBM dumped the language (their term is sunset). Also, take a look at the History. ParkPlace and Digitalk where the first major commercial players in the Smalltalk arena, they merged and then went out of business.

我可以从个人经验告诉你。仍然使用Smalltalk,喜欢它,并且已经使用了一些风格。尽管Smalltalk是一种很好的语言,并且是您提到的所有内容,但是您不太可能说服普通的CIO/CTO在新项目中使用Smalltalk。当然,您甚至可能很难说服一个保守的CIO/CTO使用Ruby。最后,如果你想要长期的商业支持和找到能够在未来支持你的系统的非专业员工的能力,你必须非常小心。例如,Smalltalk在90年代早期是一件大事IBM在90年代后期投入了大量资金。对于IBM来说,Smalltalk将成为所有业务应用程序的下一种语言。IBM将Smalltalk应用于所有东西,包括他们的大型机系统。Java变得流行起来,占领了市场,Smalltalk成为了一个利基市场。一年多前,IBM抛弃了这门语言(他们的术语是sunset)。还有,看看历史。ParkPlace和Digitalk是Smalltalk领域的第一批主要商业参与者,他们合并后就倒闭了。

#22


2  

I love both Smalltalk and Ruby - but have found that Ruby is more applicable to what I do daily, and is closer to my heart (practically speaking). What does Ruby offer that Smalltalk doesn't?

我喜欢Smalltalk和Ruby——但是我发现Ruby更适合我每天的工作,而且更贴近我的内心(实际上是这样)。Ruby提供了Smalltalk没有的什么?

  • Text-based scripting
  • 基于文本的脚本
  • Low implementation requirements (runs in more places)
  • 低实现需求(在更多地方运行)
  • Easier to learn and justify (Perl and Python programmers will have no trouble
  • 更容易学习和证明(Perl和Python程序员不会有麻烦)。
  • Easier to move programs around - text files!
  • 更容易移动程序周围-文本文件!
  • Interfaces well with native environment
  • 与本机环境的良好接口
  • Anywhere Java runs, jRuby runs...
  • Java运行的任何地方,jRuby都在运行……
  • Bigger and much more active community
  • 更大更活跃的社区

Some have mentioned gst (GNU Smalltalk); the problems still hold.

有人提到gst (GNU Smalltalk);仍持有的问题。

#23


2  

Use whatever makes you more powerful and faster to beat your challenge.

用任何能让你更强大、更快的方法来战胜挑战。

For us, a little in house framework, we built in top of seaside is really our superpower.

对我们来说,在房子的框架里,我们在海边建造的是我们真正的超级力量。

I love the RoR community, it has the right attitude. That's very very valuable. But at the same time, technologically, seaside makes you stronger against more complicated problems.

我喜欢RoR社区,它有正确的态度。这是非常宝贵的。但与此同时,从技术上讲,seaside使您在更复杂的问题上变得更加强大。

You can do great seaside web apps using open-source stuff.

你可以使用开源软件做一些很棒的海边网络应用。

dabbledb was a sartup based on seaside and, hey! Avi sold it to twitter in june this year!

dabbledb是一个基于seaside的sartup网站,嘿!今年6月,阿维将它卖给了twitter !

I say you don't need to wait for others to approve your initiative.

我说你不需要等别人批准你的计划。

Just go for it. Make it done. Show us that works.

就试试吧。让它做。展示我们的作品。

You're not alone. We are on the same boat.

你不是一个人。我们在同一条船上。

#24


2  

Interesting perspective from Robert Martin (from RailsConf 2009): "What Killed Smalltalk Could Kill Ruby, Too"

Robert Martin的有趣观点(来自RailsConf 2009):“杀死Smalltalk的东西也可能杀死Ruby。”

#25


0  

I think part of the problem is the development-environment-is-the-runtime. This gives a lot of power, but it also presents a larger learning curve.

我认为部分问题在于开发环境——即运行时。这提供了很多力量,但它也提供了更大的学习曲线。

Here is a hello world tutorial.

这里是hello world教程。

This is very different from other languages where I just need to know how to open a text editor and copy and paste text, hit save, and run a compiler. I HAVE to know how to use the environment. That tutorial doesn't even show me how to create a basic program (which is likely more a fault of that tutorial) that I can run.

这与其他语言非常不同,我只需要知道如何打开文本编辑器、复制和粘贴文本、单击save和运行编译器。我必须知道如何使用环境。该教程甚至没有告诉我如何创建一个我可以运行的基本程序(这很可能是该教程的错误)。

There is definately a higher cost of just getting things going than most other languages.

毫无疑问,与大多数其他语言相比,让事情顺利进行的成本更高。

Most languages have some nice eye-catching code that they can show off. I haven't seen that with Smalltalk. I also think that there is some stigma to Smalltalk because it has been around so long and it is still relatively obscure.

大多数语言都有一些吸引人眼球的代码,我还没有见过Smalltalk。我也认为Smalltalk存在着一些耻辱,因为它已经存在了很长时间,而且它仍然是相对模糊的。

#26


0  

I think the BIGGEST difference is that Ruby is much more similar to perl in terms of USEAGE. Smalltalk never got a foothold into the "scripting" languages.

我认为最大的区别在于Ruby在使用方面更类似于perl。Smalltalk从未在“脚本”语言中立足。

The VM is really cool and I hope ruby will have something similar to it so we can treat everything on our OS that is written in ruby as object in memory space, however until then I simply enjoy Ruby's terse, short syntax, the ability to just write a tiny script and reuse it later. Ruby got all the advantages of perl and the OOP is much more similar to smalltalk than perl's OOP hack.

ruby VM真的很酷,我希望会有类似于我们可以治疗一切对我们的操作系统是用ruby编写的对象在内存空间,但在此之前我只是享受ruby的简洁,短的语法,只写一个小脚本和重用的能力。Ruby获得了perl的所有优点,OOP比perl的OOP hack更类似于smalltalk。

#27


0  

I would go further than Jonke's answer, and say there are now a large number of languages that have a very strong community, almost enough to suit every taste, and a subset of these have mainstream recognition (i.e. your manager will let you use them at work as well).

我想比Jonke的答案更进一步,我想说,现在有很多语言都有很强的社区,几乎足以满足每个人的口味,其中有一部分语言是主流认可的(也就是说,你的经理也会让你在工作中使用它们)。

It's easy to learn the basics of a language, but to actually use it effectively you need to invest enough time to learn the platform and the tools, as well as the syntax and the idioms. IIRC, McConnell claims that it takes about three years to become truly proficient.

学习一门语言的基础知识很容易,但是要真正有效地使用它,您需要投入足够的时间来学习平台和工具,以及语法和习语。麦康奈尔声称,要真正精通IIRC,大约需要三年的时间。

Given those things, it's hard to justify spending a lot of time on languages like LISP and Smalltalk, although they are interesting and perhaps educational to look at.

考虑到这些因素,花大量时间在LISP和Smalltalk这样的语言上是很困难的,尽管它们很有趣,也很有教育意义。

#28


0  

As a latecomer to discussion, the main problem with Smalltalk and Lisp is that you can't run them with CGI or FastCGI on shared hosting.

作为讨论的后来者,Smalltalk和Lisp的主要问题是不能在共享主机上使用CGI或FastCGI运行它们。

The unwashed masses are never going to use them if they need VPS or dedicated servers to use them. IMHO Seaside is superior to almost anything out ther, but will it run on Dreamhost or Webfaction?

如果需要VPS或专用服务器来使用它们,这些未清洗的群众永远不会使用它们。IMHO Seaside比其他任何东西都优越,但它会在Dreamhost还是web敌视中运行?