The Greedy King

There once ruled a king named C. He spoke a simple language. His subjects stood in awe of his greatness, until his child, whom they called C++, took his place on the thrown. His seat was warm and none would dare challenge his reign. But in a distant land there were whispers of an abomination. A thing they called Java (for lack of a better name). Java was huge! He was bloated, verbose and ran on a Virtual Machine, making him virtually indestructible! The kingdom of C++ was a messy one, while Java was clean because it had its own personal garbage collector. It was sloppy, but it got the job done. Java was a greedy king, he knew he had the numbers and he craved the power that C++ had. So he declared war. Needless to say, Java defeated C++ and most of C++’s subjects now followed Java and played by his rules.

There once ruled a king named C. He spoke a simple language. His subjects stood in awe of his greatness, until his child, whom they called C++, took his place on the thrown. His seat was warm and none would dare challenge his reign. But in a distant land there were whispers of an abomination.  A thing they called Java (for lack of a better name). Java was huge! He was bloated, verbose and ran on a Virtual Machine, making him virtually indestructible! The kingdom of C++ was a messy one, while Java was clean because it had its own personal garbage collector. It was sloppy, but it got the job done.  Java was a greedy king, he knew he had the numbers and he craved the power that C++ had. So he declared war. Needless to say, Java defeated C++ and most of C++’s subjects now followed Java and played by his rules.

https://img.memesuper.com/bd3e69d22814c715ceb98d99b0d38943_-java-sparta-abc-memes-memes-java_600-597.jpeg

There existed a tiny island called Lambda, where only the most intelligent lived. They were a peaceful little nation of men that spoke with a Lisp. Nobody ever bothered them. Nobody ever saw them as a threat. They developed languages that only they could comprehend, much different from what their fellow man at the kingdom of Java spoke. These mad mathematicians were developing a virtual machine that would end all virtual machines. They were crafting a language that sat atop the VM that would allow vast amounts of concurrency and speed within distributed systems. Could these mere mortals possibly have possessed the ability to see into the future?

As time went by, the great kingdom of Java grew and grew. The Java Virtual Machine (JVM) was improved and things were dandy. Until they weren’t.

The world had grown to love Java and all it stood for. They had become blinded to the perils of the modern world. The world was connected with billions of people sending data back and forth.  Java could not cope. His subjects developed gruesome methods to try deal with the concurrency issues, but Java just couldn’t handle the load. Woe to all those that did not seek shelter from the coming tempest.

https://img.memesuper.com/b960114da3aa42880b2abfb6b0d9f2bf_learn-java-they-said-itll-be-memes-java_625-468.jpeg

On one faithful day, a trade boat had just returned from Lambda with great news of a paradigm they’d called Functional Programming. The JVM was flexible, and so the “bright minds” of the land built functional languages that would run on it. “My king, forgive us. We could not match the power of the languages at Lambda.” Alas, the king found clojure in his new language, Scala.

https://memegenerator.net/You-CanT-If-You-DonT

Word of functional programming travelled across the land and new languages sprouted. These languages operated in much the same way. They used a technique called message passing to instruct on what to do next. They used models to keep state immutable, meaning that something said about a particular thing could never be changed. You would have to create a new thing with new traits. No take backs. If you said that Chihuahuas were small, then they would forever be small. You would have to create a new breed of dog entirely, with a new size. This is what they call state. The state of a Chihuahua is small. If that fact was mutable and we allowed everyone to change it then we would never know what the end result would be. A giant Chihuahua, maybe?

https://impossiblehq.com/wp-content/uploads/2013/04/Final-Form.jpg

This is what made functional languages so predictable… immutable state.

Back at Lambda, there was an ancient city that stood at the mouth of an active Volcano they named Ericson. It was here that the Erlang Virtual Machine (BEAM) was born. It was perfect in every way. Rigid, but never arrogant. It could handle concurrency in a manner never before seen. The people of Mount Ericson spoke Erlang, a tongue which possessed vasts amounts of inner beauty, beneath its ugly vineer. It never quite took off, until one day a vagabond strayed into the city, seeking refuge. He was a Brazilian programmer that spoke Ruby. A language much like English, create by a Japanese man.

http://i0.kym-cdn.com/entries/icons/facebook/000/018/489/nick-young-confused-face-300x256_nqlyaa.jpg

It was an abomination in disguise, but had its merits. The vagabond, José Valim, was talented and quickly picked up Erlang. He began to change the language and fuse it with his own. It was from this fusion that the world was blessed with Elixir.

Java continued his dictatorship. His sheeple were like mindless zombies, writing line after line of fault-ridden code. Systems crashed, companies closed down, coders became depressed. They grew lazier by the day.

José travelled all over the world, preaching of his new dialect. He spoke of salvation, a place where all programmers could write better code, in far fewer lines. He delivered great sermons of a Fault-Tolerant way; supervisors which would watch over your delicate code and make sure that it behaved as expected. He promised no more multithreading, and offered a new approach called parallel processing. So many great things, falling, alas, on so many deaf ears.

And so, the world remained in a deadlock, ruled by a king supported by the wealthiest in the land. His followers too afraid to change… too lazy to adapt.  No one man should have all that power.

However, one by one, the eyes of the blind opened and functional languages became more popular.

Java had a cousin, dubbed Javascript, Guardian of the Front-End. He was loved, quick to react and drove a V8. Java and Javascript once battled over control of the web. Java, being slow and bloated, lost. Javascript saw the coming change and decided to add functional programming to his skill-set. He showed the coders of the world that functional can be better and faster.  Java was being outmatched in almost every area he once excelled, even losing his grip on his ability to program Androids.

Every great empire falls, and Java knew he would soon be overthrown. It was just a matter of time.

The End.

by Sherwin Hulley

Leave a Reply

Your email address will not be published. Required fields are marked *