Print

Integration Watch: Fan of a new language



Andrew Binstock
Email
May 15, 2009 —  (Page 1 of 2)
In recent times, we are seeing an extraordinary proliferation of new languages. On one hand, thousands of domain-specific languages have been spawned by the advent of tools that facilitate their creation. On the other hand, we find an equal surge in full-scale, general-purpose programming languages.

The renaissance of these larger programming languages derives from several advances: a renewed interest in dynamic languages and their benefits; hardware that’s fast enough to run dynamic languages rapidly; and the existence of two runtime environments—the JVM and the .NET CLR—that are widely used, well understood, and fast. As a result, we have an embarrassment of language choices that was inconceivable a decade ago.

In this column, I have previously highlighted various interesting options among these languages: Ruby, Groovy, D, NetRexx and a few others that elegantly address specific problems. Recently, I have been spending time with the Fan programming language, which, while still early in its development cycle, is more finished and mature than most new languages at this point in their development.

Fan is a dynamic, object-oriented language that runs on the JVM and the .NET CLR. It does this by generating intermediate code (called fcode) that is dynamically translated into Java bytecodes or a .NET DLL at startup. This step introduces a slight pause, after which programs run at full “native” speed for the given environment.

New languages arise because a developer needed to solve a problem that was not addressed well by common alternatives. The developers of Fan, a pair of brothers—Brian and Andy Frank—worked on embedded Java applications and found it difficult to sell the accompanying software to customers who were committed to Windows Mobile and .NET. So they decided to write Fan to solve the problem and to keep it small enough that it could fit easily in a mobile device.

In the process, they removed language verbosity and added features they wanted. Their vision is remarkably balanced and complete. The language, on the verge of freezing its 1.0 features, offers dynamic typing and/or strong typing (a la Groovy); closures and first-class functions; extensive concurrency support (thread-safe classes with immutability specified, threads with built-in message passing, and actors); and elegant handling of various namespace issues. Low-level features include default method parameters, nullable data types, built-in field accessors, unchecked-only exceptions, and simplified numerics. The numerics handle the overflow problem that is the favorite of language puzzle writers: All integers are longs and all floats are doubles. So either type uses 64-bits and effectively does not overflow. Chars are 16-bit UTF entities.



Related Search Term(s): Fan, Java

Pages 1 2 


Share this link: http://sdt.bz/33476
 

close
NEXT ARTICLE
SD Times Blog: Java 6 exploit found, no patch available
Users should either uninstall Java 6 or upgrade to Java 7, advise experts Read More...
 
 
 




News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>

   
 
 

 


Download Current Issue
APRIL 2014 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?