spoiler

Hopefully it’s funny enough to offset that I’m reposting my own post.

  • spacegoat@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    5 days ago

    Trying to comprehend. Can’t any function be broken up to limitless sub functions? Doesn’t writing email fall under the function of sending email? Where can I read the docs about this?

    • pmk@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      3 days ago

      In “The UNIX Programming Environment” from 1984, mail is described like this:
      “Sending mail to someone is straightforward. Suppose it is to go to the person with the login name nico.
      $ mail nico
      Now type in the text of the letter
      on as many lines as you like…
      After the last line of the letter
      type a control-d.
      ctl-d
      $”

      • GeirGrusom@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        3 days ago

        This is also why SMTP is such a fucked up protocol. It was designed so that you could just follow the email protocol by hand. HTTP as well followed this philosophy (up to 2.0 at least). A decade or so ago there was a bug in outlook where you couldn’t have a line with only a period in it because that’s the end-of-email signal in SMTP.

    • driving_crooner@lemmy.eco.br
      link
      fedilink
      arrow-up
      2
      ·
      4 days ago

      Writing an email and sending it are pretty different functions, it’s doesn’t looks like that because the sending part is just pressing a bottom and all the protocols and sever communication is done in the background hide from the user.

      It’s like asking the postal service to also write and package your mail and then open and read it for the recipient.

      I personally like that philosophy and try to use it in my job, with functions that only do one job and programs that only do one job and then just chain them and make calls from each other. My users doesn’t know it’s like that and they doesn’t notice any difference, but it’s help me debugging or implementing new functionalities.

      • uniquethrowagay@feddit.org
        link
        fedilink
        arrow-up
        3
        ·
        4 days ago

        Can writing writing a word and formatting it bold and underlined not be considered three separate functions, requiring three different programs? That’s what the comment above was talking about

        • driving_crooner@lemmy.eco.br
          link
          fedilink
          arrow-up
          3
          ·
          4 days ago

          You need two programs for that, one to write the text and other to display it with the format because different encodings can format differently.