Ruby 可以做哪些 C# 4.0 做不到的事情?
我刚刚读完这本书的 Ruby 章节 7 周内掌握 7 种语言< /a>.除了这里的一些语法糖之外,我真的看不出有什么是 C# 无法用类似语法完成的。我确实知道这两种语言本质上是不同的,但我的问题涉及它的用法而不是设计。
相关问题让我相信 Ruby 提供的功能并不比 C# 多:
我几乎没有使用过 Ruby,而且我对该语言的理解仍然非常有限,所以也许尝试过 .NET 4.0 和 Ruby 的人可以用具体的例子来回答。
与 C# 4.0 相比,哪些任务需要使用 Ruby 完成的工作要少得多?
对于那些感兴趣的人,因为问题已在此处结束,我在 Programmers.SE 上再次尝试,并接受了那里的答案。
I just finished reading the Ruby chapter of the book 7 Languages in 7 Weeks. Aside from some syntactic sugar here and I can't really see anything which can't be done with C# with a similar syntax. I do understand both languages are inherently different, but my question relates to its usage rather than design.
Relevant questions make me believe Ruby offers little more than C#:
- Why aren't c# programmers drawn to ruby as java programmers are?
- Is Ruby's code block same as C#'s lambda expression?
I hardly worked with Ruby and my understanding of the language is still very limited, so perhaps somebody who experimented with both .NET 4.0 and Ruby can answer with concrete examples.
Which tasks require significantly less work with Ruby than C# 4.0?
For those interested, since the question got closed here, I tried again on Programmers.SE, and accepted an answer there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
两种语言都是图灵完备的,因此您可以对它们进行完全相同的操作。
不过,我认为有些任务在 Ruby 中需要较少的工作,而有些任务在 C# 中则需要更少的工作。
Both languages are Turing complete, so you can do exactly the same with both of them.
However I think some tasks will require less work in Ruby, and some in C#.