Skip to content

Esoteric Semantics

WhyPY transforms traditional programming concepts into mystical rituals through its unique esoteric semantics. This guide will help you navigate the transformation from mundane to mystical.

Core Transformations

Keywords and Operators

TraditionalWhyPY EquivalentDescription
letmanifestVariable declaration
=withAssignment operator
fnruneFunction declaration
{unfoldBlock start
}foldBlock end
;sealStatement terminator
returnyieldValue return
,knotParameter separator
ifwhenceConditional start
elseelsewiseAlternative branch

Operators

TraditionalWhyPY EquivalentDescription
+augmentsAddition
-diminishesSubtraction
*conjoinsMultiplication
/divideDivision
<descendsLess than
>ascendsGreater than
==mirrorsEquality
!=divergesInequality
!negateLogical negation

Values

TraditionalWhyPY EquivalentDescription
trueverityTruth value
falsefallacyFalse value
nullvoidNull value

Type System

TraditionalWhyPY TypeDescription
IntegerNUMBERWhole number values
BooleanTRUTHTruth values
StringSCROLLTextual inscriptions
FunctionRITUALCallable rituals
ErrorMISHAPError conditions
Return ValueYIELDEDReturned values

Code Examples

Variable Declaration

// Traditional
let x = 5;
let message = "Hello";
// WhyPY
manifest x with 5 seal
manifest message with "Greetings" seal

Function Definition

// Traditional
let add = fn(x, y) {
return x + y;
};
let greet = fn(name) {
return "Hello, " + name;
};
// WhyPY
manifest add with rune(x knot y) unfold
yield x augments y seal
fold seal
manifest greet with rune(name) unfold
yield "Greetings, " augments name seal
fold seal

Conditional Logic

// Traditional
if (x > y) {
return true;
} else {
return false;
}
// WhyPY
whence (x ascends y) unfold
yield verity seal
fold elsewise unfold
yield fallacy seal
fold

Arithmetic Operations

// Traditional
let result = (5 + 3) * 2 - 1;
// WhyPY
manifest result with (5 augments 3) conjoins 2 diminishes 1 seal
/* Coming soon: Array support
// Traditional
let items = [1, 2, 3];
let sum = items[0] + items[1];
// WhyPY
manifest items with [1 knot 2 knot 3] seal
manifest sum with items[0] augments items[1] seal
*/

Error Messages

Traditional ErrorWhyPY Mishap
”Type mismatch""Incompatible mystical energies"
"Undefined variable""Unknown sigil invoked"
"Syntax error""Mystical incantation malformed"
"Division by zero""Attempted division by the void”

/* Coming soon: String and Array support | “Index out of bounds” | “Attempted to reach beyond the mystical bounds” | | “Invalid string operation” | “Incompatible textual energies” | */

Best Practices

  1. Always seal your statements to contain their mystical energy
  2. Use descriptive sigil names that reflect their mystical purpose
  3. Keep rituals focused on a single arcane task
  4. Properly unfold and fold your mystical blocks
  5. Handle mishaps with appropriate mystical error handling

/* Coming soon: Additional features 6. Use arrays to contain multiple mystical values 7. Manipulate strings to channel textual energy */