A 5 minute lightning talk on the Fantom programming language.
Presented to the London Software Craftsmanship Community (LSCC) Talks Event #14 in London on Thursday 16 July 2015.
Transcript follows:
What is Fantom?
Fantom is an elegant Open Source programming language.
Before I say more, lets first look at some other languages...
Slide 2
Java gets compiled into .class files, which get run on the JVM.
.NET languages like C# are compiled into assemblies, which get run on the CLR.
In a similar vein, Fantom (.fan) get compiled into .fcode files that are used by the Fantom Runtime. which in turn can run on... both the JVM AND the CLR!
Slide 3
But better than that, Fantom also compiles to javascript, which runs on any browser.
The core language tackles all the hard stuff so you don't have to, and gets it right!
Slide 4
It has immutable classes, their values can not change, they are set in time, preserved for ever, like mosquitoes in amber!
Concurrency in Fantom uses the Actor paradigm, just like the Akka framework in java. Each thread runs inside it's own Actor and the only way to communicate with an Actor is to pass it messages.
There is no mutable state, no volatile syncing and no borked double locking mechanisms, just message passing.
In Fantom the only messages you can pass to an Actor are... immutable classes! Why? Because they're lightweight and thread safe!
Slide 5
All Fantom objects can be serialised to a human readable string! And not some cryptic binary code.
And Fantom objects when serialised look like Fantom source code!
No more dodgy XML parsing for me!
Slide 6
Fantom has it's own Windowing Toolkit, which wraps the eclipse SWT, which runs on any machine with Java installed. But the cool thing is, that the same windowing desktop code also runs on any browser...
Slide 7
The Fantom language is statically typed, but has unique and lenient type inference which shrinks (equivalent) Java and C# code. It also has a concise and functional API which shrinks the code even further.
Less code, less cognitive overhead…
Oh yes, the core API. It's written from scratch, and it's fast. Very fast. Some even say -> faster than Java!
As well as the big things, Fantom also pays attention to the small details that affect us programmers every day.
Slide 8
Small things such as Nullable types. Variables cannot be null unless you explicitly allow it.
So Sir Charles Antony Richard Hoare, inventor of the billion dollar mistake, "In your face!"
Slide 9
Fantom also has Elvis.
Slide 10
So, what can Fantom be used for? Well I personally have built:
Desktop applications
Slide 11
Games - most notably Gundam, a shoot'em'up that can also run in a browser.
Slide 12
And, given they are so prolific nowadays, a multitude of Web applications.
Slide 13
And Why?
Because Fantom IS fun and it Gets Stuff Done!
Hello, and welcome my lightning talk entitled:
Fantom is Fun & Gets Stuff done!
I *am* SlimerDude - also known as Steve Eynon.
What is Fantom?
Well, Fantom is an elegant Open Source programming language.
Like most modern languages it's compiled.
Before I say more, lets first look at Java...
Java has .java files that get compiled into .class files, which get run on the JVM.
And...
.NET languages like C# have .cs files that get compiled into assemblies, which get run on the CLR.
In a similar vein...
Fantom has .fan files that get compiled into .fcode files that are used by the Fantom Runtime which in turn can run on... both the JVM AND the CLR!
Awesome.
But better than that, Fantom also compiles to javascript, which runs on... any browser.
Awesome.
But, is it a new and trendy dynamic language? No.
Is it tedious exploration of cutting edge static type design? No.
It IS a pragmatic and easy to read language, so much so, it's almost boring!
The core language tackles all the hard stuff so you don’t have to, and it gets it right!
It has immutable classes. These are classes defined with the 'const' keyword that mean it's constant - their values can not change, they are set in time, preserved for ever, like mosquitoes in amber! Which also means they're very lightweight and thread safe!
Concurrency in Fantom uses the <Actor> paradigm, just like the Akka framework in java. Each thread runs inside it's own Actor and the only way to communicate with an Actor is to pass it messages.
There is no mutable state, no volatile syncing and no borked double locking mechanisms, just message passing.
In Fantom the only messages you can pass to an <Actor> are... immutable classes! Why? Because they're lightweight and thread safe!
You can pass messages like strings!
All Fantom objects can be serialised to a human readable string! And not some cryptic binary code. Anyone can write, edit, and read serialised fantom objects.
And guess what a Fantom object looks like when it's serialised... Fantom source code!
No more dodgy XML parsing for me!
Awesome!
Want to build a Desktop app in Java? You could use AWT - sucks! Java Swing - better, but still sucks. Or you could use eclipse's SWT! Nice!
Fantom has it's own Windowing Toolkit, which wraps the eclipse SWT, which runs on any machine with Java installed. But the cool thing is, that the same windowing desktop code also runs on any browser...
That’s awesome!
Back to the source code... The Fantom language is statically typed, but has unique and lenient type inference which shrinks (equivalent) Java code like this … to Fantom code like this…
And then it has a concise and functional API which shrinks the code this way too.
Less code, less cognitive overhead…
Awesome.
Oh yes, the core API. It’s written from scratch, and it's fast. Very fast. Some even say -> faster than Java!
As well as the big things, Fantom also pays attention to the small details that affect us programmers every day.
- No primitive types, everything is an object.
- Closures and functions are first class objects.
- All fields accessors implicitly, or explicitly, have getters and setters.
And then… it has Nullable types. Variables cannot be null unless you explicitly allow it.
So Sir Charles Antony Richard Hoare, inventor of the billion dollar mistake, "In your face!"
Fantom also has Elvis.
Not this elvis, but this elvis.
In all Fantom has been very well thought out.
So, what can Fantom be used for? Well I personally have built:
Desktop applications
Games - most notably Gundam, a shoot'em'up that can also run in a browser.
<click>
And, given they are so prolific nowadays, a multitude of Web applications.
And, as they are so prolific nowadays, a multitude of Web applications.
And Why?
Because Fantom IS fun and it gets stuff done.
Want to know more about Fantom? Then visit fantomfactory.org. If that's too hard to remember then pick up a contact card (I got plenty!), or just come and chat with me after the talks.
My name is Steve Eynon and this has been a 5 min lightning talk!
Tank you!
Because Fantom IS fun and it gets stuff done.
Want to know more about Fantom? Then visit fantomfactory.org. If that's too hard to remember then pick up a contact card (I got plenty!), or just come and chat with me after the talks.
My name is Steve Eynon and this has been a 5 min lightning talk!
Tank you!
Because Fantom IS fun and it gets stuff done.
Want to know more about Fantom? Then visit fantomfactory.org. If that's too hard to remember then pick up a contact card (I got plenty!), or just come and chat with me after the talks.
My name is Steve Eynon and this has been a 5 min lightning talk!
Tank you!