Nitin has posted 391 posts at DZone. View Full User Profile

Fan – Next generation Java?

  • submit to reddit

Your browser is not able to display this multimedia content.


In this presentation, filmed at a recent Skills Matter JWUG meeting, Stephen Colebourne gives users a very comprehensive overview of the language, Fan. He puts this forward as an improvement over the existing Java language and highlights its portability for both the Java VM and .NET CLR (and even JavaScript).

Stephen describes some of the pitfalls in Java and explains the mindset behind the reasons for some of the syntax found in Fan. He states that the language is designed around expectations from realworld experience and follow the code patterns found in main stream programming languages; resultantly, Fan is tailored for real-world applications as opposed for academic purposes. Fan uses three levels to define a unique reference to any element, in the form of “pod::type.slot” (where top level “pods” are similar to modules). This representation is particularly useful when it comes to debugging with stack traces.

Fan is still a relatively new language and its very familiar syntax to existing Java and C# programmers will ease the transition with a minimal learning curve. This coupled with the flexibility of creating concurrent programs through immutability, and the even balance between static and dynamic typing, means Fan is certainly a promising contender to be Java's successor.

 Download the slides for this presentation here (231 KBs)

Published at DZone with permission of its author, Nitin Bharti.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Arek Stryjski replied on Fri, 2009/04/03 - 4:21am

Here is what they are writing on web page:

"Fan is designed as a practical programming language to make it easy and fun to get real work done. It is not an academic language to explore bleeding edge theories, but based on solid real world experience."

"IDE Support
We aren't IDE users ourselves, so this isn't our highest priority."

I don't get it. "Solid real world experience" and no IDE support... I was thinking it is XXI century...


Casper Bang replied on Fri, 2009/04/03 - 6:05am

Great presentation! I agree with Arek, IDE support is paramount to Fan's adoption, look how long it's taking Scala penetrating even if it has been around 2-3 years longer.

Stephen Colebourne replied on Fri, 2009/04/03 - 7:44am in response to: Arek Stryjski

"We aren't IDE users ourselves, so this isn't our highest priority"

Fan ships with Flux, a text editor with syntax colouring written in Fan itself that is currently being enhanced with more IDE like elements.

An IntelliJ plugin has been started by Fred Simon.

And, in general, writing a good IDE plugin with auto-complete should be a lot easier than Groovy (as its statically typed) and Scala (as the complexity is a lot less). Still, Fan really needs someone to take on the Eclipse plugin task...




Dennis Cheung replied on Fri, 2009/04/03 - 11:10am

I just have the following questions after I finsihed the video.



Str? nullablestr;
Str str;

If (nullablestr!=null){
       str = nullablestr;  // is it valid ?



enum Foobar {   foo, bar  }
Foobar sample = foo  // it is stronlytyped,  can I use a shorter form, if foo is not another slot


Don't it have anything like   "using(IDisposable){ sth stupid }"  in C#

Where is LINQ

How about Regular Expressions and XML?  will there any literal or syntax support ?


Liam Knox replied on Fri, 2009/04/03 - 7:04pm

Reading the Fan web page justifications, I just cant see this language going anywhere. Businesses do not just change their mind set interms of .Net or Java. They dont look for portability. They generally use one or other or both. These languages will diverge more and the interop will be web services. Having a cross compile is a nice degree project but in practice redundent. I cant really see any justification of an adoption of Fan. I have looked at Scala also. In this you can see an atempt to provide more ( functional etc ) , but it is so far removed and uncoordinated I cannot see this going anywhere either. It does make me feel that what James G did with Java was a master stroke, removing concerns, simplifying and covering a great percentage of required functionality. It seems these 'new' languages are just playing with this template, lacking real direction and originality.

John De Goes replied on Wed, 2009/04/08 - 10:22am

"Businesses do not just change their mind set interms of .Net or Java. They dont look for portability." Speak for yourself. I'm a business owner and we have to support .Net, Java, and browser-based platforms. Fan already has .Net and Java, and JavaScript will be finished in the near future. That would let us support 3 platforms with one code base, which would lead to a cost reduction of > 30%. Anyone providing APIs or libraries will share my views on this issue. As would a great many who are currently targeting one platform but don't want to be locked into that platform forever, should the tides change.

John Denver replied on Wed, 2009/04/08 - 12:51pm

Nobody will use this language even the name sucks are you fan of what rofl. I preffer to spend my time with Scala or F# or Haskell than this wannabe.

Liam Knox replied on Wed, 2009/04/08 - 5:54pm in response to: John De Goes

I think we will just have to wait and see in its adoption. I am not hopefull. I am also speaking with a personal perspective, but that is with respect to a massive sector where the uptake is always .Net rich client Java server and minor mixes. I cant see this Fan changing anything in that light and still think cross compatability at a byte code level is not a real requirement that will give benefit. Long term these languages will diverge more.

I would also question this the same as initiatives such as Mono, where the requirement seems to of been invented before the problem exists.

Liam Knox replied on Wed, 2009/04/08 - 6:01pm in response to: John Denver

Sadly I think Scala will die on the wayside also. This is a shame as it is quiet interesting but I think just comes too far away from Java interms of simplicity and clarity.

It seems to of had every idea banged into it thinking about the function rather than the feal and intuitive nature of usage. Perhaps if they just took a little less haste, took Java as a base, made it pure OO, added a well thought through Closure design, you would have a better base that doesnt look to unatural to Java developers.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.