对 Fantom 编程语言的第一印象?

发布于 07-05 22:49 字数 1450 浏览 10 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

方圜几里 2024-07-12 22:49:25

我认为他们的解释概括了这一点:

“我们创建 Fan 的主要原因是
编写可以无缝地运行的软件
在 Java VM 和 .NET 上运行
CLR。 现实情况是,很多软件
组织致力于一项或
这些平台中的另一个。”

更好。在没有关于它们的任何信息的情况下(他们的博客只是一个错误页面),我认为他们没有理由一定要这样做每种语言对于其设计目的来说都相当优雅(尽管我在刚才看到的小 Fan 代码中看到了一些尴尬)——真正的问题。是它如何扩展到全新的事物,我们还不知道,

但如果您的组织有“一切都必须在我们的虚拟机上运行”的规则,那么这对您来说可能是一个可以接受的妥协

。例如,您的问题是关于 SO 的第一个 Fan 问题——比 Lisp 少几个数量级。

对于什么问题,Python 是最好的解决方案? Ruby 已经可以在两个虚拟机上运行(或两者都不能运行),拥有大型社区和大型库,并且似乎具有相同的抽象级别,但更加成熟。

I think their explanation sums it up:

"The primary reason we created Fan is
to write software that can seamlessly
run on both the Java VM and the .NET
CLR. The reality is that many software
organizations are committed to one or
the other of these platforms."

It doesn't look better than all other non-JVM/.NET languages. In the absence of any information about them (their blog is just an error page), I see no reason why they would necessarily get this righter than others. Every language starts out fairly elegant for the set of things it was designed for (though I see some awkwardness in the little Fan code I looked at just now) -- the real question is how well it scales to completely new things, and we simply don't know that yet.

But if your organization has a rule that "everything must run on our VM", then it may be an acceptable compromise for you.

You're giving up an awful lot just for VM independence. For example, yours is the first Fan question here on SO -- a couple orders of magnitude fewer than Lisp.

For what problem is Fan the best solution? Python and Ruby can already run on both VMs (or neither), have big communities and big libraries, and seem to be about the same level of abstraction, but are far more mature.

娇纵 2024-07-12 22:49:25

我认为它看起来是一种很棒的语言功能,但我不确定它有多大用处。 我认为针对 .NET 和 JVM 没有那么有用。 Java 已经是跨平台的了,.NET 和 Mono 也是跨平台的。 通过定位两个虚拟机,您必须仅使用两个虚拟机上都可用的 API。 您无法使用任何适用于 Java 和 .NET 的优秀本机 API。 我无法想象他们的 API 与 Java 或 .NET 的 API 一样完整。

I think it looks like a great language feature-wise, but I'm not sure how useful it is. I don't think it is all that useful to target .NET and JVM. Java is already cross-platform, and .NET is too, with Mono. By targeting two VMs, you have to use only the APIs that are available on both. You can't use any of the great native APIs that are available for Java and .NET. I can't imagine that their API is anywhere near as complete as either Java's of .NET's.

一身软味 2024-07-12 22:49:25

这很有趣。

Java(或 C#)的创建是为了通过创建 JVM(或 CLR)来消除平台依赖性,JVM(或 CLR)将在运行时将代码编译为特定的机器代码。

现在,有一种独立于虚拟机的语言吗? 嗯……到底是什么?!?!

再说一次,这是一个非常有趣的话题,这可能是未来......:) 采用一种通用的单一语言

This is very interesting.

Java (or C#) was created in order to eliminate Platform dependency by creating a JVM (or CLR) that will compile the code into a specific machine code at run time.

Now , There is a languege which is Virtual Machine independent? umm .... what the hell?!?!

Again , this is a very interesting topic , That might be the future...:) going to one universal single languege

对你的占有欲 2024-07-12 22:49:25

直到几周前我才听说过范。 从网站上看,它只有一年左右的历史,所以还很年轻并且未经证实。 然而,有几个有趣的点:首先,该语言通过提供参与者模型(类似于 erlang)和支持不可变对象来解决并发问题。 其次,该对象遵循 Scala 的类型推断示例。 类型推断允许程序员省略类型声明,但由编译器计算它,提供了与动态类型语言一样短而清晰的代码的优点,同时保留了静态类型语言的效率。 最后,它似乎是一种非常快的语言,几乎与 Java 一样快,并且真正接近或击败了 JM 上第二快的语言:scala。 显示性能的基准可以在 "="">http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine?type=powerpoint。

I have never heard of Fan until a couple of weeks ago. From the web site, it is about one year old so still pretty young and unproven. There are a couple of interesting points however: First the language is tackling the problem of concurrency by providing an actor model (similar to erlang) and by supporting immutable objects. Second, the object follows the example of Scala with type inference. Type inference allows the programmer to omit type declarations but have it computed by the compiler providing the advantage of short and cleaner code as in a dynamically type language while preserving the efficiency of a statically type language. And last, it seems like a very fast language, nearly as fast as Java and really close or beating the second fastest language on the JM: scala. Benchmark showing the performance can be found at http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine?type=powerpoint.

静谧 2024-07-12 22:49:25

它看起来很受 Ruby 的启发。 它说它是 RESTful,但我不知道具体如何。 与 boo 相比,后者更成熟,但在很多方面都相似(其语法为不过,Python 受到了启发)。

保持泛型和命名空间非常有限的设计决策是值得怀疑的。

It looks very inspired by Ruby. It says that it's RESTful but I don't see how exactly. Compare with boo, which is more mature yet similar in many ways (its syntax is Python inspired, though).

The design decisions to keep generics and namespaces very limited are questionable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文