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
Traditional
WhyPY Equivalent
Description
let
manifest
Variable declaration
=
with
Assignment operator
fn
rune
Function declaration
{
unfold
Block start
}
fold
Block end
;
seal
Statement terminator
return
yield
Value return
,
knot
Parameter separator
if
whence
Conditional start
else
elsewise
Alternative branch
Operators
Traditional
WhyPY Equivalent
Description
+
augments
Addition
-
diminishes
Subtraction
*
conjoins
Multiplication
/
divide
Division
<
descends
Less than
>
ascends
Greater than
==
mirrors
Equality
!=
diverges
Inequality
!
negate
Logical negation
Values
Traditional
WhyPY Equivalent
Description
true
verity
Truth value
false
fallacy
False value
null
void
Null value
Type System
Traditional
WhyPY Type
Description
Integer
NUMBER
Whole number values
Boolean
TRUTH
Truth values
String
SCROLL
Textual inscriptions
Function
RITUAL
Callable rituals
Error
MISHAP
Error conditions
Return Value
YIELDED
Returned values
Code Examples
Variable Declaration
// Traditional
let x =5;
let message ="Hello";
// WhyPY
manifest x with5 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 withrune(x knot y) unfold
yield x augments y seal
fold seal
manifest greet withrune(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 sumwith items[0] augments items[1] seal
*/
Error Messages
Traditional Error
WhyPY 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
Always seal your statements to contain their mystical energy
Use descriptive sigil names that reflect their mystical purpose
Keep rituals focused on a single arcane task
Properly unfold and fold your mystical blocks
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
*/