Perlthon corrects the obvious oversights that anyone familiar with both Perl and Python has recognized for years. The result is a language with visual memory allocation, self-optimizing runtimes, market-based concurrency, and the FICKU philosophy that experienced engineers will immediately recognize as correct.
"Explicit is better than implicit. Unless it's implicit."
$ pip install perlthon --use-strict --enable-sigilsuse;
use strict;
use warnings
+------+ # memory: 384 bytes
+------+
$def main($i):
bless $msg = "Hello, World!";
print €msg unless $ⵯ
return $ⵯ;Perlthon provides a comprehensive feature set for resource-conscious development.
Define memory with ASCII boxes. When exceeded, the garbage collector appends more boxes to your source file. Subsequent runs are pre-allocated.
Five dereference modes using currency symbols (€, £, ¥, ₹, ₩). Each provides different semantics: standard, queued, cached, formatted, or rounded.
Fuzzy function matching via Levenshtein distance. Hot loops with misspellings trigger automatic source file renames for performance.
Declare loop budgets upfront with %loop_intent. Unused iterations can be borrowed by subsequent loops, preventing resource waste.
Threads maintain credit scores that determine CPU frequency allocation. Subprime threads run slower, enabling power-efficient mobile deployment.
No version pinning. The runtime self-updates before execution. Breaking changes encourage teams to maintain their code rather than accumulate technical debt.
Practical examples demonstrating core language features.
@class
$def Person {
$def __init__($i, $name):
bless $i->{name} = shift
pray $DEBUG; # from outer scope
return $i
$def greet($i):
print "Hello, $i->{name}";
}The @class decorator combines with both braces and colons. The shift keyword handles argument unpacking while $i provides the instance reference (the variable $i is reserved).
# Declare loop intent, use only some
%loop_intent: max=100, var=$i;
for $i in range(30):
print $i # only used 30/100
# Borrow remaining 70 iterations
%loop_intent: borrow=$i, var=$j;
for $j in range(50):
print $j; # uses 50 of 70 - OK!Loop intents declare iteration budgets. Unused iterations from completed loops become available for subsequent loops to borrow, optimizing resource utilization.
Responses from early adopters of the Perlthon ecosystem.
"The GC writing to my source files was confusing at first, but now I appreciate having the memory requirements documented automatically. My PRs are more interesting now."
Marcus T.
Systems Engineer
"I used to enjoy working alone. After introducing Perlthon to my team, management loved Python so much they put me on a pip. Now I get to work alone full-time."
David K.
Former Senior Developer
"The continuous deployment model broke our staging environment 47 times last quarter. Our team has never been more agile or responsive to change."
Sarah Chen
DevOps Engineer
"I've been using the ¥ operator for configuration values that shouldn't change after startup. The ₩ rounding keeps our financial calculations appropriately imprecise."
Anonymous
Backend Developer
"There's more than one way to do it."
"There should be one obvious way to do it."
"There's usually a way to do it."
Perlthon finds the pragmatic middle ground between Perl's flexibility and Python's structure.
Explore the language features in our interactive playground or read the comprehensive documentation.
Perlthon follows continuous deployment. Your code always runs on the latest language specification.