Skip to content
DevMeme
3591 of 7590
Languages Post #3928 · source on Telegram

Python And Assembly Type Truce

Description

The image uses the classic muscular handshake meme format, with two flexed arms clasping hands against a dark painted background. White text above the hands reads "Not having to declare data types," the left arm is labeled "Python," and the right arm is labeled "Assembly." The joke is that Python avoids explicit type declarations through dynamic typing, while assembly avoids them because it operates close to raw registers, memory, and instruction operands rather than high-level language types. It is funny because two languages from opposite ends of the abstraction stack share a surface trait for almost completely opposite ergonomic reasons.

Comments

15
Anonymous ★ Top Pick Python skips type declarations to be friendly; assembly skips them because every byte is your problem now.
  1. Anonymous ★ Top Pick

    Python skips type declarations to be friendly; assembly skips them because every byte is your problem now.

  2. Deleted Account 4y

    Its funny how modern coders doesn't know a type named "word", which represents a 2 bytes positive number.

    1. @RiedleroD 4y

      it's funny how modern coders don't know that what a "word" is depends on the architecture

      1. Deleted Account 4y

        In what exactly architecture "word" is not a type?

        1. @RiedleroD 4y

          no, I mean a "word" isn't always 2 bytes big - it depends on the cpu architecture (although most modern ones do have 2 byte - sized words afaik)

          1. Deleted Account 4y

            Ahh, i see.

          2. @Zhenyokmsk 4y

            Arguably, in the i386 arch, a word is actually 32 bits, although it is called dword "for backward compatibility reasons" )

            1. @RiedleroD 4y

              I mean, I guess that's correct, aye. We were talking about the data-type word in C though, and afaik that's always 2 bytes in all x86 derivatives

              1. @izhilin 4y

                C does not have a "word" data type. I would say "int" is the closest to the "machine word" concept you imply.

                1. @RiedleroD 4y

                  it doesn't? my bad, I'm not a C coder - I'm barely able to read C code.

      2. @izhilin 4y

        And it's even more funny modern coders rarely know that the standard allows "char" to be, say, 4 bytes.

        1. @RiedleroD 4y

          it's also funny how java defines 'char' as an UTF-16 codepoint, making ascii storage as chars impractical. Also they're used like signed 16-bit numbers in calculations. signed. did I say funny? I meant sad. Also the official javadocs (links) say "The char data type is a single 16-bit Unicode character, […]" - why is this weird? The Unicode standard deliberately doesn't use the word 'character' because of its ambiguity - they only use code unit, codepoint, grapheme and glyph afaik

  3. Deleted Account 4y

    Funny I first learned about word/dword before I learned to program due to CheatEngine haha

  4. @pxrxnoia 4y

    js: am i a joke?

  5. @izhilin 4y

    Yes.

Use J and K for navigation