Cake Team Blogs

Cake Solutions architects, implements and maintains modern and scalable software, which includes server-side, rich browser applications and mobile development. Alongside the software engineering and delivery, Cake Solutions provides mentoring and training services. Whatever scale of system you ask us to develop, we will deliver the entire solution, not just lines of code. We appreciate the importance of good testing, Continuous Integration and delivery, and DevOps. We motivate, mentor and guide entire teams through modern software engineering. This enables us to deliver not just software, but to transform the way organisations think about and execute software delivery.



Dictionary of functional programming

Posted by Jan Machacek

Find me on:

27/03/13 08:14

Last year, I gave you the terrifying Truth about Scala. But that was just a small piece of the functional programming world.

Our horizons have expanded. I welcome Clojure, Haskell, F#, OCaml, even Coq. And the view from the Vista is amazing.

The edited highlights

It is my pleasure to give to you the edited highlights of the most important entries in our extensive work The real dictionary of functional programming!

Jiggery pokery [n]. Simple, elegant, intuitive or pragmatic design. Typically employed by Haskell programmers. Convinces the beginner programmers that Haskell is all of those; intermediate programmers that they are in fact beginners. Experts–beginners for more than S (S (S (S O))) years–use it as source for new research papers. (Viz implicits and bakery of doom.)

Bakery of doom [n]. Alternative to S-- F--. Elegant way to inject dependencies in a configurable manner, where elegant means hardcoded and configurable means compiled. Just like the original Doom, it incites violence / PHP skills in children.

Function [f]. Anonymous implementation of an interface with exactly one method. Some languages provide intuitive syntax sugar.

[x, y](int z) -> int { return x + y - z; }

Pompous languages refer to functions as equations, because equations are pure. Except when they compute impure boxes, but that does not change the algebra of programming at all. Which is jolly good.

Point-free [adj]. Functions without points. Think of point as a value here; this is not completely accurate, but usually doesn't matter, except quite often. The FP equivalent of overloading the () operator in C++, which is going to expose you as pompous show-off when you have to go back and try to understand your own code.

Monad [f]. A jack-in-a-box. The boxes can be bound together and collapsed like dominoes. Just like dominoes, it takes extraordinary effort to set it up and only one idiot to destroy it all. (See also comonad.)

Comonad [f]. A box-in-a-jack. The jacks can be bound together and exploded like a bomb. Just like bombs, it takes extraordinary effort to set it up and only one idiot to destroy it all. (Viz monad.)

Arrow [m]. A bit like monad with locale on a thread. Jiggery pokery of higher order. Often used to intimidate clients, especially with draconian validation rules. (See also who on earth does not use at least 18 characters, 5 digits and 5 specials in their passphrase?)

Typeclass [f]. Defines of social and behavioural rules for types. The final attempt of Great Britain to achieve world domination. Perfected by the Haskell team in The Other Place during the depths of the Cold War; then spread by the Cambridge spies.

Instance [f]. (1) Implements behavioural and social rules for types, usually by 'anging on to outdated imperialist dogma which perpetuates the economic and social differences in our society. Usually sneered upon by the more libertarian & forward-thinking object-functional programmers. (2) The last piece of outdated imperialist dogma of object-oriented programming. Usually sneered upon by the more libertarian & forward-thinking pure functional programmers.

Scalaz [f]. Implementation of concepts of category theory. F-U to pompous languages. Just like other expletives, it is best avoided; but most find themselves frothing at the mouth, proclaiming they knew that they should have done marketing with sociology instead.

Template Haskell [m]. JSPs in Haskell. With great power comes great responsibility, so it’s only good that there’s not that much power, letting you be completely irresponsible with your code. (See Yae Yo Je, oh sod it!)

Implicits [n]. Elegant and à la mode alternative to global variables. Excellent and intuitive way of translating your C extern double TAX_RATE; lines. Best experienced with slightly wrong types or Strings.

Higher-kinded types [m]. Overlords and masters of the ordinary types. Elegant and expressive way to express elegance in Scala and some jiggery pokery in Haskell. Best experienced with Unicode characters such as ? or ?.

Defined [av]. Wishful thinking in Coq; vehemently opposed & obstructed. Stackoverflow usually gives answers that require thinking; the ungrateful & forever miserable followersmy dear friends on Twitter suggest the same. Qed.

core.logic [f]. Logic programming. Tee hee. Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, he, he, he, he, he, he, he, he, ho, ho, ho, ho, ho, ho, ho [enough!—Ed.]

Research [n]. (1) Plausible alternative to it’s compiling excuse for not doing work. Employed by programmers; there is a strong correlation between pompousness of a language and time spent researching. [needs more research!—Ed.] (2) Strategic activity of utmost importance. Used by non-coding architects and project managers to expand their expertise gained from an in-flight magazine. (See also functional programming, cloud and big data.)

Happy April fools' day!

Topics: Haskell, Functional programming

Posts by Topic

see all

Subscribe to Email Updates





Case Studies



Find out more



Find out more



Find out more