简体   繁体   English

在.Net中使用Scala有什么好处?

[英]What are the benefits of using Scala in .Net?

Scala is a peculiar programming language in that it targets both JVM and the CLR. Scala是一种特殊的编程语言,因为它同时针对JVM和CLR。 But what are the benefits? 但有什么好处? Is it worth considering it as a viable alternative to the F# language? 是否值得将其视为F#语言的可行替代方案?

Scala on .NET is an ongoing effort led by Miguel Garcia. Scala on .NET是由Miguel Garcia领导的持续努力。 Latest state is that we are almost able to bootstrap on .NET. 最新状态是我们几乎能够在.NET上进行引导。 I have no doubts that something solid will come out of this but it's still too early to make commitments when. 我毫不怀疑会有一些实实在在的东西,但现在做出承诺还为时尚早。

Long term, I do not see Scala as a competitor to F# or C#. 从长远来看,我不认为Scala是F#或C#的竞争对手。 It would be hard to compete on an equal footing with languages that are natively suppported by Microsoft. 与微软原生支持的语言平等竞争将很难。 On the other hand, I do see some attraction of Scala for shops that want to run on .NET as well as on the JVM. 另一方面,对于希望在.NET和JVM上运行的商店,我确实看到了Scala的一些吸引力。

Most of the web search hits I see from "Scala .NET" are from 2008 or early 2009. Scala is an interesting language, but my admittedly-ill-informed impression is that is is not a "viable alternative" for an industrial-strength .NET application. 我从“Scala .NET”中看到的大多数网络搜索点都是从2008年或2009年初开始。斯卡拉是一种有趣的语言,但我公认的不明智的印象是,它不是工业强度的“可行替代方案” .NET应用程序。

I see people talk in passing about writing apps that are portable across CLR and JVM, and it's a nice idea in theory, but in practice I don't see any evidence that anyone has done this for reals. 我看到人们正在谈论编写可以在CLR和JVM上移植的应用程序,这在理论上是一个好主意,但在实践中我没有看到任何证据表明任何人为实际做了这个。 (If people do know of examples, please post them.) (如果有人知道例子,请发布。)

I really love Scala but in the current state of its .NET implementation: A Big NO. 我真的很喜欢Scala但是在.NET实现的当前状态:一个大的NO。 It hasn't been updated in a while. 它暂时没有更新。 The JVM version is really a lot ahead. JVM版本确实领先很多。 I don't see Scala's .NET port maturing enough to match its JVM counterpart in a foreseeable future. 在可预见的未来,我没有看到Scala的.NET端口足够成熟以匹配其JVM对应端口。

You'd be better off with F#. 你最好用F#。

The benefit for compared to what? 相比之下的好处是什么?

The benefit compared to a different language, that only targets one of the big platforms? 与另一种语言相比,它只针对一个大平台? Well you can run on both platforms; 那么你可以在两个平台上运行; accessing libraries from both platforms without switching the language; 无需切换语言即可从两个平台访问库;

The benefit of running on .Net instead of JVM? 运行.Net而不是JVM的好处? Well if you work in a .Net heavy environment this might be more of an requirement then a benefit. 好吧,如果你在.Net重工作环境中工作,这可能是一个需求,然后是一个好处。

The benefit compared to F#? 与F#相比的好处? I don't know F#, but when you live in a .Net centric world, I'd guess know how for F# will be easier available then for Scala on the CLR. 我不知道F#,但是当你生活在一个以.Net为中心的世界时,我想知道如何在CLR上为Scala提供更容易的F#。 So assuming the two languages are somewhat comparable I'd prefer F# 所以假设这两种语言有些可比,我更喜欢F#

As far as I know, no one really uses Scala.NET yet. 据我所知,还没有人真正使用Scala.NET。 If people want to run Scala code on .NET, the best option is IKVM. 如果人们想在.NET上运行Scala代码,最好的选择是IKVM。 And Scala works fine on IKVM, from all reports. 从所有报告中,Scala在IKVM上运行良好。

There is still work ongoing on Scala.NET, and it looks like it will be viable (with full Visual Studio support) "eventually". Scala.NET上仍在进行工作,看起来它“可行”(完全支持Visual Studio)“最终”。 This is the most informative resource, Miguel Garcia is currently employed by LAMP and I think funded by a Microsoft grant to improve Scala.NET to production ready status. 是信息量最大的资源,Miguel Garcia目前受雇于LAMP,我认为由微软资助,可以将Scala.NET提升到生产就绪状态。 But this could be misremembered... at least, there is work from August 2010, so its not dead. 但这可能是错误的记录......至少,2010年8月有工作,所以它没有死。

Due to stack overflows "clever" spam prevention, I can only post one link. 由于堆栈溢出“聪明”垃圾邮件预防,我只能发布一个链接。 So you will have to google for "IKVM", and "IKVM scala" to find out about those. 因此,您必须谷歌搜索“IKVM”和“IKVM scala”以了解这些信息。 The link I included is the hardest to find. 我包含的链接是最难找到的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用WCF有什么好处? - What are the benefits of using WCF? 使事件符合Net准则有什么好处? - What are the benefits of having events conforming to Net guidelines? 托管CLR与使用ClrCreateManagedInstance相比-有什么好处? - Hosting CLR versus using ClrCreateManagedInstance - what are the benefits? 从 .NET 2.0 升级到 .NET 3.5 有什么好处? - What are the benefits of upgrading from .NET 2.0 to .NET 3.5? .Net Framework 中的字符串实习 - 有什么好处以及何时使用实习 - String interning in .Net Framework - What are the benefits and when to use interning 有人可以解释在.Net中使用主互操作程序集的好处吗? - Can someone explain the benefits of using a Primary Interop Assembly in .Net? 将bindingsource与bindinglist一起使用有什么好处 <business obj> 作为数据源? - What are the benefits of using a bindingsource with bindinglist<business obj> as datasource? SocketTaskExtensions 对使用 SocketAsyncEventArgs 的 Socket 异步方法有什么好处? - What are the benefits of SocketTaskExtensions against Socket asynchronous methods using SocketAsyncEventArgs? 使用ORM而不是XML序列化/反序列化的好处是什么? - What are the benefits of using ORM over XML Serialization/Deserialization? ExpandoObject 的真正好处是什么? - What are the true benefits of ExpandoObject?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM