Has anyone here given the Fantom programming language a whirl? (pun intended).
有没有人在这里给Fantom编程语言一个旋转? (双关语)。
My first impression:
我的第一印象:
- I like the ability to have the code run on either the .NET or Java VM.
- The syntax is nice and clean and does not try anything fancy.
- I have a belief that "the library is the language" and the developers of Fan believe that their USP is their APIs:
我喜欢在.NET或Java VM上运行代码的能力。
语法很干净,不会尝试任何花哨的东西。
我相信“图书馆是语言”,而Fan的开发人员认为他们的USP是他们的API:
But getting a language to run on both Java and .NET is the easy part - in fact there are many solutions to this problem. The hard part is getting portable APIs. Fan provides a set of APIs which abstract away the Java and .NET APIs. We actually consider this one of Fan's primary benefits, because it gives us a chance to develop a suite of system APIs that are elegant and easy to use compared to the Java and .NET counter parts.
但是,在Java和.NET上运行语言很容易 - 实际上有很多解决方案可以解决这个问题。困难的部分是获得便携式API。 Fan提供了一组API,它们抽象出Java和.NET API。我们实际上认为这是Fan的主要优点之一,因为它使我们有机会开发一套优雅且易于使用的系统API,与Java和.NET计数器部分相比。
Any other thoughts, first impressions, pros and cons?
还有其他任何想法,第一印象,利弊吗?
5 个解决方案
#1
2
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."
“我们创建Fan的主要原因是编写可以在Java VM和.NET CLR上无缝运行的软件。事实上,许多软件组织都致力于这些平台中的一个或另一个。”
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.
它看起来并不比所有其他非JVM / .NET语言更好。如果没有关于它们的任何信息(他们的博客只是一个错误页面),我认为没有理由他们为什么会比其他人更好。对于它所设计的一组东西,每种语言都开始相当优雅(虽然我看到我刚才看到的小扇码中有些尴尬) - 真正的问题是它如何扩展到全新的东西,我们只是还不知道。
But if your organization has a rule that "everything must run on our VM", then it may be an acceptable compromise for you.
但是,如果您的组织有一条规则“一切都必须在我们的VM上运行”,那么对您来说这可能是一个可接受的妥协。
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.
你为了VM独立而放弃了很多东西。例如,你的第一个关于SO的粉丝问题 - 比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.
Fan最好的解决方案是什么问题? Python和Ruby已经可以在两个虚拟机上运行(或者两者都没有),拥有大型社区和大型库,并且似乎具有相同的抽象级别,但更为成熟。
#2
1
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).
它看起来很受Ruby的启发。它说这是RESTful但我不知道究竟是怎么回事。与boo相比,boo在许多方面更成熟但更相似(但它的语法是Python启发的)。
The design decisions to keep generics and namespaces very limited are questionable.
保持泛型和命名空间非常有限的设计决策值得怀疑。
#3
1
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.
直到几周前我才听说过Fan。从网站上看,它大约有一年的历史,所以还很年轻,未经证实。然而,有一些有趣的观点:首先,语言通过提供一个actor模型(类似于erlang)和支持不可变对象来解决并发问题。其次,该对象遵循带有类型推断的Scala示例。类型推断允许程序员省略类型声明,但让它由编译器计算,提供简短而清晰的代码的优点,如动态类型语言,同时保持静态类型语言的效率。最后,它似乎是一种非常快速的语言,几乎与Java一样快,并且非常接近或击败JM上第二快的语言:scala。可以在http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine?type=powerpoint找到显示性能的基准。
#4
0
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.
创建Java(或C#)是为了通过创建JVM(或CLR)来消除平台依赖性,JVM(或CLR)将在运行时将代码编译为特定的机器代码。
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
再次,这是一个非常有趣的话题,可能是未来...... :)去一个通用的单一语言
#5
0
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.
我认为它看起来像一个很棒的语言功能,但我不确定它有多么有用。我认为目标.NET和JVM并不是那么有用。 Java已经是跨平台的,而.NET也是Mono。通过定位两个VM,您只需使用两者都可用的API。您不能使用任何可用于Java和.NET的优秀本机API。我无法想象他们的API几乎和.NET的Java一样完整。
#1
2
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."
“我们创建Fan的主要原因是编写可以在Java VM和.NET CLR上无缝运行的软件。事实上,许多软件组织都致力于这些平台中的一个或另一个。”
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.
它看起来并不比所有其他非JVM / .NET语言更好。如果没有关于它们的任何信息(他们的博客只是一个错误页面),我认为没有理由他们为什么会比其他人更好。对于它所设计的一组东西,每种语言都开始相当优雅(虽然我看到我刚才看到的小扇码中有些尴尬) - 真正的问题是它如何扩展到全新的东西,我们只是还不知道。
But if your organization has a rule that "everything must run on our VM", then it may be an acceptable compromise for you.
但是,如果您的组织有一条规则“一切都必须在我们的VM上运行”,那么对您来说这可能是一个可接受的妥协。
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.
你为了VM独立而放弃了很多东西。例如,你的第一个关于SO的粉丝问题 - 比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.
Fan最好的解决方案是什么问题? Python和Ruby已经可以在两个虚拟机上运行(或者两者都没有),拥有大型社区和大型库,并且似乎具有相同的抽象级别,但更为成熟。
#2
1
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).
它看起来很受Ruby的启发。它说这是RESTful但我不知道究竟是怎么回事。与boo相比,boo在许多方面更成熟但更相似(但它的语法是Python启发的)。
The design decisions to keep generics and namespaces very limited are questionable.
保持泛型和命名空间非常有限的设计决策值得怀疑。
#3
1
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.
直到几周前我才听说过Fan。从网站上看,它大约有一年的历史,所以还很年轻,未经证实。然而,有一些有趣的观点:首先,语言通过提供一个actor模型(类似于erlang)和支持不可变对象来解决并发问题。其次,该对象遵循带有类型推断的Scala示例。类型推断允许程序员省略类型声明,但让它由编译器计算,提供简短而清晰的代码的优点,如动态类型语言,同时保持静态类型语言的效率。最后,它似乎是一种非常快速的语言,几乎与Java一样快,并且非常接近或击败JM上第二快的语言:scala。可以在http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine?type=powerpoint找到显示性能的基准。
#4
0
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.
创建Java(或C#)是为了通过创建JVM(或CLR)来消除平台依赖性,JVM(或CLR)将在运行时将代码编译为特定的机器代码。
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
再次,这是一个非常有趣的话题,可能是未来...... :)去一个通用的单一语言
#5
0
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.
我认为它看起来像一个很棒的语言功能,但我不确定它有多么有用。我认为目标.NET和JVM并不是那么有用。 Java已经是跨平台的,而.NET也是Mono。通过定位两个VM,您只需使用两者都可用的API。您不能使用任何可用于Java和.NET的优秀本机API。我无法想象他们的API几乎和.NET的Java一样完整。