Follow

Hot-take:

"print()" is the (and some other programming languages) version of the "💾 3.5in-floppy-disk-as-document-save-icon" of most software.

It's an artifact of older times, when output was, well, printed out.

Almost nobody *actually* prints program output directly out on a physical printer. But it's so deeply ingrained in coding culture, it's taken for granted and rarely questioned.

At some point the connection between "print()" and 🖨️ will become almost indecipherable to young techies.

· · Web · 9 · 7 · 10

@sullybiker yup. Although I kind of feel most young techies still have experienced interfacing with a printer, much more so than most young technology users experienced floppy disks.

So, I'd say, a decade? Something like that.

@rysiek@mastodon.technology I have always read this as the older definition of print, meaning to create writing that is not cursive

@TransGal4872 @rysiek This is EXACTLY how I have always thought of it as well.

I wasn't sure why a printer would be involved, at all. I _rarely_ use them. (Basically: for printing tickets or government forms that I must fill out - otherwise - it's read using another means.)

Well... we do still say "print to the screen". So, while it does have its roots in physical printing, I don't think the fact that it is called "print()" will be like saving is to the floppy disk (i.e. totally nonsensical for modern systems) but the original/historical meaning would still probably be widely unknown

@rysiek I think of it as print to screen, it kind of makes sense that way too

btw in php the function is called echo, because, uh, I have no idea

@piggo yeah, but it still comes from times when printers were *the* interface.

PHP is weird, what can I say? 🤷‍♀️

@rysiek @piggo
> I think of it as print to screen,
Ah, the name "Print Screen" has exactly the same legacy. This button was meant trigger an actual printer or plotter, but now it just means a screenshot. Then the word "screenshot" has the same legacy again - originally it literally meant pointing a special camera at an oscilloscope screen to save the data on film...

@piggo @rysiek There a unix command called echo, and php was used/made by the same sorts of people that used unix.
@lighthousehermit @rysiek okay well why is the unix command called echo though? ...

@piggo @lighthousehermit well because if you're sitting on front of a screen, the command is a close approximation of an actual echo.

You say "echo hello" and get a "hello" back.

@rysiek I've used printers a lot, but I never thought of print() or printf() as a metaphor for physical printing. Separate magesteria; print(), in a program, means 'output()' to me.

So it's already become disassociated, at least in my mind.

@lighthousehermit @rysiek It was definitely confusing for me when I learned programming the first time. "Uh, professor, are you sure it's OK for me to say System.out.println? I don't want to waste ink."

@rysiek I think the difference is very important, especially since ttys are very deeply ingrained at the heart of any UNIX-based system. Calling them a printer ignores the fact that they were always bi-directional, as well as the fact that video terminals that came later still emulated them. Even the xterm and a plethora of "terminal" applications still use precisely the same interface.

@rysiek I'm looking forward to the Linux kernal printfpdf(3) system call.

@dredmorbius The unfamous Payload Data Format injected directly into an OS Kernel. But what could possibly go wrong. LOL

When you see all the goodies within Qubes-OS to prevent PDF files as malware injection method, I syncerely don't think it is the right path to follow...

@rysiek

@stman Actually, the printfpdf would be an output direct from the kernel.

Though if you'd like someone to write a kernel-space PDF parser, I'm sure someone would be happy to oblige ...

@rysiek

I 'm nevertheless relieved that I can direct my software to print to the output device rather than scrawl in illegible chicken scratches to the output device.
Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!