Comment

From Esolang
Jump to navigation Jump to search
This page explains how comments are able to be achived in difrent categories of esolangs, to see how comment are able to be achived in difrent languages, go to User:Ractangle/Sandbox/Comments

Comments are parts of code which are ignored and not ran. They are often used to explain complicated code, or to temporarily prevent old code from running.

While most serious languages support comments of some sort, this page mostly focuses on how comments can be formed in various esolangs by a specific category

String-rewriting paradigm languages

To actually make a comment in a String-rewriting paradigm language. You just replace a character that never get's used in code. In example:

/t/hi/
Hello world

is a valid comment in ///

Languages with halting instructions/infinite loops

You can write comments at the end of programs in most languages that have halting instructions/infinite loops. For example, in Deadfish variations with the h command:

h comment

Or in brainfuck:

[-]+[] comment

Or in 4ME/borth:

P;
E;
Use S: and E: instead of P; and E; in borth

No-code esolangs

Anything is a comment in no-code esolangs, because the result doesn't depend on the code. In example, running this in Nope.:

// This is a comment!
# This is a comment, too!
; This is also a comment!
Comments can be everywhere!

will always print "Nope."

Fungoids

Fungoids are pretty easy to comment on, you just have to make the comment where the IP woudn't touch it. In example running this in Befunge:

>v  hi i will never be touched in my life
^<

will just make the IP go in a loop

See also