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.

@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 @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? ...
Follow

@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.

· · Web · 0 · 0 · 1
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!