Skip to content
DevMeme
3865 of 7435
A Pun-derful Guide to Function Declaration Syntax
Languages Post #4208, on Feb 14, 2022 in TG

A Pun-derful Guide to Function Declaration Syntax

Why is this Languages meme funny?

Level 1: Different Ways to Say It

Imagine four friends are each teaching you a new made-up word that means “do something.” The first friend is very brief – they only say two letters, like someone texting “OK” instead of “okay.” The second friend is super cheerful – they shout a happy real word that sounds fun. The third friend says the word in a normal way but with a little funky twist, like singing it with a groove. The fourth friend is very formal – they pronounce the entire long word clearly, every letter, as if reading from a script. It’s funny because all four friends are basically saying the same thing, but each in their own style. One is extremely short, one makes it sound like a good time, one makes you think of funky music, and one says it very properly and long. This meme is like that: each programming language is a friend with a different personality, showing you how they write “let’s do this function!” in their own special way. The humor comes from seeing the contrast – from super-short and playful, all the way to long and serious – all for a simple idea that’s common to everyone. It’s like four people greeting you: one waves and says “Yo!”, another jumps and yells “Fun times!”, the next one does a little dance and says “Funk yeah!”, and the last one writes you a formal letter saying “Hello, how do you do?”. They’re all saying hello in their own style, and that mix of styles is what makes it amusing and easy to remember.

Level 2: The Long and Short

In programming, a function is a reusable block of code that performs a specific task. Different programming languages use specific keywords (special reserved words) to define or declare a function. This meme shows four languages side-by-side, each using a different keyword to mean "here comes a function." It’s highlighting how some languages love abbreviation while others stick to the full word. The joke is easier to see when you know what each piece means:

  • Rust (fn): Rust is a systems programming language known for being efficient and concise. To declare a function in Rust, you write the keyword fn. It’s basically the word “function” smashed down to just f and n (almost like texting shorthand or a license plate). In the meme, the picture next to Rust’s code is a small airplane labeled “PLNE.” If you try to read that, it’s like the word “plane” with the vowel A removed – just like fn is “function” with most of the letters removed. This is the vowel_drop_joke: Rust drops extra letters (like vowels) and gets straight to the point. For a new developer, seeing fn might be odd (you might think “what’s fn?”) but it quickly becomes natural as “that’s how you start a function in Rust.” Rust’s approach can make code a little quicker to write and read once you’re used to it, since it’s very short and visually distinct. It’s part of Rust’s LanguageQuirks that make it feel unique.

  • Kotlin (fun): Kotlin is a modern programming language (often used for Android app development) that chose the keyword fun to define a function. Yes, it spells f-u-n just like the word “fun” meaning enjoyable. So when you write a function in Kotlin, you literally start with fun. The meme shows a group of friends partying on a beach with guitars and drinks, clearly having fun. This image emphasizes the playful aspect of Kotlin’s keyword. The idea is that Kotlin makes coding a function fun (or at least it wants to appear friendly and approachable). For someone learning Kotlin, it might even put a smile on your face to type fun, as if the language is saying “let’s have fun writing this function!”. Technically, fun is just short for “function” (it’s missing the ction at the end), but Kotlin’s designers likely enjoyed that the abbreviation forms a real word. This choice in syntax is part of Kotlin’s design to be concise but also human-readable. It certainly makes code conversations funny: e.g., “How do you define a function in Kotlin?” “Oh, you just write ‘fun’.” – which sounds like you’re describing a good time, not coding! The meme’s humor here is very straightforward: Kotlin’s functions are fun (visually and in spirit).

  • Go (func): Go (sometimes called Golang) is a language created by Google for simplicity and clarity. It uses the keyword func to start a function definition. This is basically just chopping the word “function” to the first four letters. It’s pronounced the same as the beginning of “function” (like saying the word “funk” without the 'k' sound at the end). In the meme, the image for Go is an album cover with the text “Play That FUNKY MUSIC.” This is a reference to a famous funk/disco song, using the word FUNKY. It ties in because func sounds like funk, which is the root of the word funky. The meme is making a pun: Go’s func is funky. So, picture a Go programmer writing a function and maybe nodding their head to some funky music – that’s the lighthearted idea. In practical terms, func in Go is a straightforward abbreviation. It’s not as short as Rust’s fn, but shorter than typing the whole “function.” Go tends to favor short keywords (var for variable, pkg often as shorthand for package names, etc.), so func fits that style. If you’re a beginner reading Go code, func is pretty readable – it’s almost the whole word, missing only “tion”. The meme emphasizes the “funky” vibe to give Go’s boring keyword a fun twist. It suggests that even a plain and pragmatic language like Go has a bit of groove in it, hidden in its syntax.

  • JavaScript (function): JavaScript is a very popular language (especially for web development) and it uses the full word function to declare a function. No abbreviations here – you type every letter: f-u-n-c-t-i-o-n. In the meme’s final row, the image shows a hand writing a long essay on paper. This exaggerates how it feels to type out a long word like “function” after seeing the other languages use fewer letters. It’s like saying, “JavaScript makes you write a whole essay just to start a function!” This is tongue-in-cheek, of course – one word isn’t really an essay, but in comparison to fn or fun, it sure looks long. For context, JavaScript was created in the mid-90s, and at that time, it wasn’t unusual to have verbose keywords. In fact, Java (which influenced JavaScript’s name and some style) has keywords like function (actually Java uses void or a return type and method name, but the style was verbose). So JavaScript stuck with the full word probably to seem familiar and clear. For new developers, function is very explicit – you immediately recognize it as the English word function, meaning “hey, this is a function.” There’s no ambiguity, but you do write more characters. Nowadays, JavaScript has newer, shorter ways to write functions (like arrow functions () => { }), but the meme intentionally uses the classic form to contrast against the newer languages. The humor is in the contrast: after Rust, Kotlin, and Go, seeing function spelled out feels like the odd one out – it’s the full word in a lineup of abbreviations. It’s as if JavaScript showed up to a casual hangout in a full suit and tie. It highlights a bit of generational difference: JavaScript, being older, is more verbose; the newer languages trend towards short-and-sweet keywords.

In simpler terms, the meme is comparing how these languages abbreviate (or don’t abbreviate) the word “function.” Each row pairs the code with an image that jokes about the style: Rust drops letters (plane loses a vowel), Kotlin is literally fun, Go feels funky, and JavaScript writes everything out like it’s doing homework. For a junior developer or someone starting out, it’s a funny recap of syntax differences. It’s common in a developer’s journey to jump between languages and stumble on things like “Oh, in Rust I write fn instead of function.” This meme takes that moment of confusion or discovery and laughs at it. It’s also a quick peek into language design: you can see how a small thing like a keyword can carry a bit of each language’s identity. None of these choices is right or wrong – they all work – but seeing them side by side is what makes it comical. It’s like an inside joke among programmers: “How many letters does your language need to say function?”

So, the long and short of it (pun intended) is: Rust, Kotlin, and Go chose to shorten the function keyword in different ways (each with a funny twist), while JavaScript sticks with the long form. This contrast is what makes developers smirk and think, “Yep, that’s exactly how those languages roll.” Whether you’re a newbie or experienced, once you know the key, you can appreciate the humor in this syntax lineup.

Level 3: Syntax Shorthand Showdown

At first glance, this meme is a clever LanguageComparison of how four programming languages spell out their function definitions – each with its own personality. It humorously highlights function_keywords and the culture behind them, capturing a spectrum from extreme brevity to full verbosity. Seasoned developers recognize these LanguageQuirks as more than just syntax: they reflect each language’s philosophy on simplicity, clarity, and even a bit of whimsy. The meme is formatted as a table with a row for Rust, Kotlin, Go, and JavaScript, each showing the language’s logo, a code snippet declaring myFunction(), and a comedic image. This side-by-side layout feels like a contest in abbreviation_vs_full_word styling – essentially a “How do you write ‘function’?” showdown.

Why is this funny to an experienced dev? It’s poking fun at the DeveloperExperience of switching between languages. Writing a function is one of the most common tasks, yet each language designer made a different choice for the keyword. In Rust you write fn myFunction(), in Kotlin fun myFunction(), in Go func myFunction(), and in JavaScript function myFunction(). All do the same job – defining a function – but the number of letters shrinks or grows, and each choice has a backstory:

  • Rust’s fn: The Vowel Dropper. Rust goes for maximum brevity, using only two letters. It’s like the language said, “We don’t need most of the word ‘function’ – just the essentials!” This row’s image shows a small airplane labeled “PLNE” (which is “plane” minus its vowel A). It’s a perfect vowel_drop_joke: Rust’s fn looks like “function” with the middle letters removed, just as PLNE is plane without the “a.” Senior devs chuckle because Rust’s hardcore, no-nonsense ethos even extends to its syntax – concise to the point of sacrificing vowels. Historically, many systems languages (and math notations) prefer terse keywords (fn might remind some of ML’s fun or just be Rust forging its own terse style). It’s a nod to efficiency and a bit of “we’re different” attitude. The upside: less typing and visually minimal code; the downside: a newcomer might blink twice – “fn? oh, that means function!” – but seasoned Rustaceans love it. This is SyntaxHumor at its best: treating characters like precious resources (maybe Rust is saving memory one keyword at a time, wink).

  • Kotlin’s fun: Have Some Fun! Kotlin chooses the keyword fun for function declarations, and the meme gleefully pairs this with a photo of friends at a beach party, guitars out, beers raised – basically having fun. The humor isn’t hidden: Kotlin literally makes function definition fun. It’s an intentional LanguageQuirk that gives the language a friendly, approachable vibe. Imagine reading Kotlin code: fun doSomething() { ... } – it almost sounds like the language is telling you to have a good time coding. For seasoned developers, there’s an extra layer of irony: Kotlin was designed by JetBrains for serious applications (it’s a statically typed language for JVM/Android), yet it sneaks a playful term into one of the most common keywords. It’s a bit of branding and personality in the syntax. The DeveloperHumor here comes from picturing enterprise developers writing fun every day with a straight face, and the meme exaggerates that cheerfulness with a literal party. Kotlin’s choice also has practical roots: it’s only one letter shorter than “func,” but it’s a real word – easy to remember and impossible to mispronounce. It balances brevity with clarity, and perhaps offers a subliminal message: coding with Kotlin is enjoyable. Senior developers might recall other languages that tried to be friendly or cute in syntax (some see a lineage from Swift’s func or even older Pascal’s verbose but friendly style). In any case, Kotlin’s row in the meme radiates positivity – a bunch of devs jamming on guitars shouting “fun!” while coding.

  • Go’s func: Keep it Funky (and Functional). Go (often called GoLang) uses func to declare a function, and the meme plays off the sound of func by showing an album cover that says “Play That FUNKY Music.” It’s a pun that tickles any dev with a sense of rhythm: func is just a ‘y’ short of “funk,” so Go keeps things funky. Technically, func in Go is a straightforward abbreviation – trim off the “tion” from “function” and call it a day. This choice mirrors Go’s overall design philosophy: simple, no-nonsense, but not quite as spartan as Rust. In terms of parsing, it’s a distinct token that the Go compiler recognizes, just like a full word, but it saves a couple of characters and feels instantly familiar (it literally reads as part of the word “function”). Long-time developers see Go’s func and might be reminded of C’s style (in C, you don’t write a special keyword at all – you declare the return type, like int main(), so in a way func in Go was a new explicit keyword but kept very short). The LanguageComparison humor here is that Go lands in the middle ground: not as terse as fn, not as cutesy as fun, but a plain spoken abbreviation. The “Play That Funky Music” image cranks this up to a joke about how saying func out loud sounds like a funky groove. It implies Go code might put you in a groovin’ state of mind – or maybe just that the Go team couldn’t resist a bit of funk. It’s an amusing connection: as if writing Go functions is as groovy as a 70s disco hit. For experienced Gophers (Go programmers), the straightforwardness of func is emblematic of Go’s mantra: clarity and simplicity, with just a touch of quirky charm (like their mascot gopher).

  • JavaScript’s function: The Whole Nine Yards. Finally, we get to JavaScript, which unabashedly spells out the entire word function for function declarations. The meme’s image for this is a hand laboriously writing a long essay on paper – capturing the feeling that typing out eight characters f-u-n-c-t-i-o-n is an ordeal after seeing the others. This is hilarious to many developers because JavaScript, despite its many oddities, stuck to a very verbose keyword from its inception in 1995. It inherited a lot of its syntax from Java (which was verbose and class-heavy), so having to write function myFunction() was just normal. But contrasted with Rust, Kotlin, and Go, poor JavaScript looks almost old-fashioned and long-winded here. The humor lands especially for those who have hopped between languages: after getting used to quick shortcuts like fn or arrow functions ()=> in modern JS, writing function can feel like writing an essay by hand. The meme’s essay-writing photo dramatizes that sensation. There’s also an implicit poke at how JavaScript was created in 10 days and borrowed from Java’s verbosity to look familiar – so we ended up with a fully spelled keyword. It’s the only one of the four that doesn’t shorten the word at all. Senior devs might grin at another layer: today’s JavaScript has evolved (ES6 introduced ()=>{} arrow functions, which let you define a function without writing the word function at all). But in the classic form, JavaScript makes you spell everything out. So the meme also hints, “JS devs had to work a bit harder on the keyboard, back in the day.” It’s a gentle ribbing of older syntax styles. And for those of us who’ve been around, it triggers memories of typing function over and over – maybe even the muscle memory of those exact keys. The image of a pen on paper tongue-in-cheek suggests that JavaScript was almost old-school formal, like writing a letter, compared to the snappy modern style of the newer languages.

In summary, this meme is funny to experienced developers because it distills each language’s syntax design choices into a single word and a single image, showing how a simple thing like a function keyword can carry a lot of cultural baggage. It’s an insider joke: we all know functionally these keywords do the same thing (define a function), but the stylistic differences are exaggerated as symbols of each language’s identity. Rust’s serious efficiency (no frivolous vowels!), Kotlin’s upbeat approach (fun is literally fun), Go’s simplicity with a twist of funk, and JavaScript’s verbose legacy (writing the whole thing out like a school essay). It’s a DeveloperHumor gem because it transforms a mundane syntax difference into a commentary on language trends and developer experiences. Who knew that the battle of fn vs fun vs func vs function could be so entertaining? This meme speaks to the polyglot programmer in all of us – making us laugh at the little things we adapt to when switching contexts. Each row is a punchline on its own, and together they tell a story: programming languages are like people, each with their own way of saying the same thing, each with their own vibe. And as any battle-scarred multi-language veteran will tell you with a chuckle, “function by any other name would run as sweet.” 😄

Description

This is a four-panel meme that humorously compares the function declaration syntax of four different programming languages through visual puns. Each panel features the language's logo, a code snippet for declaring a function, and a corresponding image. The first panel shows the Rust logo with 'fn myFunction()' next to an image of a crudely rendered airplane labeled 'PLNE,' a surreal meme pun on 'fn.' The second panel features the Kotlin logo and 'fun myFunction(),' paired with a photo of people having fun on a boat, a literal interpretation. The third panel displays the Go logo with 'func myFunction()' next to a retro graphic that reads 'Play that FUNKY Music,' a pun on 'func.' The final panel shows the JavaScript 'JS' logo and the code 'function myFunction(),' alongside a photo of someone writing a long, dense essay by hand. For experienced developers, the humor lies in the clever wordplay and the final jab at JavaScript for having a comparatively verbose keyword, a long-standing trope in language comparisons

Comments

17
Anonymous ★ Top Pick Modern languages treat function declaration like a command. JavaScript treats it like a formal declaration of intent that must be notarized
  1. Anonymous ★ Top Pick

    Modern languages treat function declaration like a command. JavaScript treats it like a formal declaration of intent that must be notarized

  2. Anonymous

    Rust: “fn” - trimmed for zero-cost abstractions; Kotlin: “fun” - marketing swears your NPEs will smile; Go: “func” - stopped typing when the scheduler pre-empted; JavaScript: “function” - leaves the verbosity to be dieted away so the bundler feels important

  3. Anonymous

    After 20 years in the industry, I've realized the correlation between function keyword length and the amount of therapy needed after debugging production issues is statistically significant. Rust developers type 'fn' because they've already optimized away their will to type unnecessary characters along with their heap allocations

  4. Anonymous

    JavaScript types out 'function' in full, then ships half its ecosystem as arrow functions to avoid ever saying it again

  5. Anonymous

    Ah yes, the four stages of function declaration grief: Rust's 'fn' where you crash and burn fighting the borrow checker, Kotlin's 'fun' where Android development is actually enjoyable for once, Go's 'func' that makes you want to play funky music while your goroutines dance, and JavaScript's 'function' keyword so verbose you might as well write it out longhand with a quill pen. The real question is: which language's function syntax best represents your current relationship with your codebase?

  6. Anonymous

    Empirical rule: keyword length is inversely proportional to compile‑time guardrails - by the time you’re typing “function”, you’re type‑checking with Grafana

  7. Anonymous

    Rust functions board the plane on time; Kotlin/Go hit the disco; JS? Still hand-scoring the callback symphony

  8. Anonymous

    Lifecycle of a function keyword: Rust’s fn - compiler yells; Go’s func - linter grumbles; Kotlin’s fun - IDE smiles; JavaScript’s function - your pager vibrates

  9. @kitbot256 4y

    function myFunction() ? So very oldschool.

  10. @dsmagikswsa 4y

    I prefer rust or go way.

  11. @lord_nani 4y

    def:

  12. @sin_senya 4y

    Return_type foo();

    1. @Box_of_the_Fox 4y

      fun foo(): bar

  13. @lord_nani 4y

    Better reference

  14. @asm3r 4y

    Arrow functions?

  15. @zotho 4y

    const f = () => {};

  16. @Dexconv 4y

    Fuc myFunction() For devs with anger issues

Use J and K for navigation