Frustrating Elixir: "Vexir"
Let me introduce you to Vexir, a deliberately frustrating variant of Elixir that maintains the functional core while making developers question their career choices.
Key Syntax Changes
- Reversed Pipe Operator: Instead of
|>, use <| which flows right-to-left
- Random Case Sensitivity: Function names must alternate uppercase and lowercase
- Mandatory Emoji Typing: All variables must include at least one emoji
- End-of-Line Semicolons: Required but only on prime-numbered lines
- Whitespace Significance: Indentation must be exactly 3 spaces, never tabs
Hello World Example
dEfMoDuLe Hello🌍 do
dEf mAiN do
"Hello, World!"
<| String.upcase()
<| IO.puts();
eNd
end
Hello🌍.mAiN()
Error Messages
** (SyntaxError) vexir_hello.vx:3: Missing mandatory emoji in variable name
** (IndentationError) vexir_hello.vx:4: Expected exactly 3 spaces, found 2
** (SemicolonError) vexir_hello.vx:5: Line 5 is prime, semicolon required
** (CaseAlternationError) vexir_hello.vx:2: Function "main" should be "mAiN"
Function Definition
dEfMoDuLe Math📊 do
# Must declare function "safety level" (1-5)
@safety 3
dEf aDd(num1_🔢, num2_🔢) when is_number(num1_🔢) and is_number(num2_🔢) do
# Must use try/rescue for all operations
try do
num1_🔢 + num2_🔢;
rescue
_ -> :error_🚫
end
eNd
end
# Function calls require explicit type annotations
Math📊.aDd(5 :: integer(), 3 :: integer()) <| IO.inspect(label: "Result" :: string());
Pattern Matching
# Pattern matching requires "certainty levels"
{value_💯, rest_📋} = [1, 2, 3] <| List.pop_at(0) ?! 80%;
# If certainty below 100%, must provide fallback
case value_💯 do
nil -> "Failed match" <| IO.puts();
v -> "Got #{v}" <| IO.puts();
end
Would you like me to explain or break down any of these frustrating features in more detail?