elonlit / Genesis

God's actual programming language.
https://esolangs.org/wiki/Genesis
Other
1.16k stars 18 forks source link

God object #12

Closed AbrahamSanders closed 1 year ago

AbrahamSanders commented 2 years ago

Since Genesis is God's actual programming language, it should be fairly straightforward to create a God object (or, since Genesis is not object-oriented, a God method). I believe this would make a useful addition to the examples.

tomyo commented 2 years ago

What would God represent here?

AbrahamSanders commented 2 years ago

An all knowing, all-encompassing entity that does everything.

Because this object holds so much data and requires so many methods, its role in the program becomes God-like (all-knowing and all-encompassing).

A "God Method" is a method that does way too many processes in the system and has grown beyond all logic to become The Method That Does Everything.

elonlit commented 2 years ago

Interesting proposal... I can see how something like this could be accomplished in Genesis by a composition of subroutines (i.e. a subroutine that contains several other subroutines and a singular call to one of them, followed by a call to the containing "parent" subroutine in the main scope), but I'm not sure what these routines would plausibly do. If you are talking about the actual source code, then I guess it could be refactored into such a method. I will do some pondering.