Skip to content
DevMeme
3162 of 7590
Languages Post #3482 · source on Telegram

Pascal's version of 'braces at home'

Description

A three-part meme in the 'we have food at home' format, making fun of the Pascal programming language's syntax. The first line shows text from 'Pascal' asking its 'Dad' (Niklaus Wirth, the creator of Pascal), 'can I have {} like every other programming language?'. The second part shows a picture of an elderly Niklaus Wirth replying, 'No, we have {} at home'. The final part, the punchline, is labeled '{} at home:' and displays a code snippet with the Pascal keywords 'begin' and 'end;'. The joke humorously highlights the verbosity of Pascal's syntax for defining code blocks (`begin...end;`) compared to the concise curly braces (`{...}`) used by the vast majority of modern, C-style programming languages

Comments

43
Anonymous ★ Top Pick Pascal walked so YAML could run
  1. Anonymous ★ Top Pick

    Pascal walked so YAML could run

  2. Anonymous

    Still easier than explaining to management why your new microservice needs BEGIN, END, and a full Terraform module just to print “Hello World.”

  3. Anonymous

    After 20 years in the industry, I've realized Pascal's 'begin...end' blocks were just preparing us for Python's whitespace debates - at least Pascal let you see where the block actually ended without counting invisible characters

  4. Anonymous

    Pascal's `begin...end` is the programming equivalent of saying 'commence' and 'terminate' instead of just using parentheses - technically correct, impressively verbose, and a constant reminder that your language predates the C syntax hegemony. It's like driving a classic car: sure, modern vehicles have power steering and fuel injection, but there's something oddly satisfying about manually cranking your code blocks into existence while younger developers wonder why you're not just using braces like a normal person

  5. Anonymous

    Pascal's begin-end: explicit structure for codebases that outlive their authors, but good luck diffing nested changes without a brace-matching IDE

  6. Anonymous

    Pascal’s block syntax scales end; count with cyclomatic complexity, so every nested refactor ends in eight consecutive end; and one missing semicolon the compiler finds 600 lines later

  7. Anonymous

    Pascal’s {} at home: begin…end; - with a semicolon, because in this grammar blocks are statements; nothing like ceremony to make your diff look productive

  8. @Creampanda 5y

    Verilog things….

  9. @tarasssssssssssssss 5y

    Mmmmmm semicolons after end🥲

  10. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

    Public Class Form1 Private Sub Form1_Load(sender as Object, e as EventArgs) Event Form1.Load MessageBox.Show("Visual Basic .NET") End Sub End Class

    1. Deleted Account 5y

      >microsoft

      1. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

        No its FreeBSD /s

    2. @dsmagikswsa 5y

      Is this Pascal?

      1. @DerBico 5y

        totally vb

        1. @dsmagikswsa 5y

          I see. Thanks

          1. @DerBico 5y

            it's a loop, just making new form instances totally looks like something that shouldn't even be legal to do

            1. @dsmagikswsa 5y

              I can see the recursive call now

      2. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

        Lol I even mentioned it in the code

        1. @dsmagikswsa 5y

          Sorry, I didn’t read it in details. And I know I don’t know this and I skip it.

          1. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

            Np

  11. @sylfn 5y

    and python lacks the curly brackets and uses indents

  12. @Assarbad 5y

    As if there is anything wrong with begin/end. C/C++ were and are too US-centric if you look at the frequency if characters needed in typical source code. Lots of keyboards around the world don't make it very easy to type { or } and a number of other characters. Digraphs and trigraphs were added into the language for that very reason.

    1. @dsmagikswsa 5y

      I can understand and it is really a historical reason that keyboard is in a different design that time.

    2. Deleted Account 5y

      They've recently removed trigraphs because nobody uses it Maybe replacing digraphs like && and || with 'and' and 'or' respectively would be nice (stares at chromeOS devs) but replacing curly brackets with begin and end today is useless

  13. @Assarbad 5y

    https://en.wikipedia.org/wiki/Niklaus_Wirth

  14. @azizhakberdiev 5y

    Callback hell in pascal: end; end; end; end; end; ...

    1. @dsmagikswsa 5y

      Same as store procedures like PLSQL and TSQL

  15. @Assarbad 5y

    Maybe those ends are trying to tell you to split up your huge functions? 😆

    1. @azizhakberdiev 5y

      Somehow they tell to end writing shitty code with callback hells

      1. @azizhakberdiev 5y

        Or say "end coding, you cannot it at all"

    2. @feskow 5y

      In Delphi and pascal ppl just decrease font size and use tab size 2 or even 1, I know one person that does that

  16. @adhdnigga 5y

    if fi

    1. @RiedleroD 5y

      iffy

    2. @AndoroidP 5y

      <if> </if>

      1. @sylfn 5y

        the worst way

        1. @AndoroidP 5y

          I know)0)

      2. @RiedleroD 5y

        <iftree id="ift1" class="iftrees" name="checks evenness"> <if id="if1" class="ifs" name="is even" condition="round($a/2)%2==0"> <pass/> </if> <else> <print out="XML programming language - XPL?"/> </else> </iftree> I hate myself now

      3. @adhdnigga 5y

        (if if)

  17. @yehorror 5y

    {} at home: /**/

  18. @adhdnigga 5y

    while(1) elihw

  19. @SamsonovAnton 5y

    For the sake of code readability, I always put comments about the closing curly brace: } // end if } // end for } // end function Class::Method } // end class Class } // end namespace NameSpace That's because the code is not always read and fixed from a full-fledged IDE with syntax highlighting, block folding and all that stuff, but from a bare console editor or debugger.

    1. @sylfn 5y

      reminds me MFC's DECLARE_MESSAGE_MAP(...) --- END_MESSAGE_MAP(... /*same thing*/)

    2. @ZgGPuo8dZef58K6hxxGVj3Z2 5y

      Lol I can remember being bothered when I switched to c# from vb but I don't have any problems now with code readability. Also I am switching to c++

Use J and K for navigation