this post was submitted on 13 Dec 2025
263 points (95.5% liked)

Greentext

7465 readers
1092 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] yetAnotherUser@discuss.tchncs.de 8 points 1 day ago* (last edited 1 day ago)

It's calling a function without a parameter.

You know how in math you had something like:

f(x) = x²

Not all functions need parameters though. The function:

f(x) = 2

does not even use the provided x! So just leave it out:

f() = 2

Similarly, you could give a function two parameters:

f(x, y) = x + y

Programmers use functions to primarily organize their code. Otherwise it would get very unreadable very quickly. Those function are usually a bit more complicated than a single line, though.

dog.walk() would call the walk() function of "dog". Some valid code could be:

dog.walk()
wait(10)
dog.stop()

This code would make the dog walk for 10 seconds assuming every function used is actually defined somewhere.