Day 6 – Lexical Imports

Perl 6 is built on lexical scopes. Variables, subroutines, constants and even types are looked up lexically first, and subroutines are only looked up in lexical scopes. So it is only fitting that importing symbols from modules is also done into lexical scopes. I often write code such as use v6; # the main functionality […]

Read more "Day 6 – Lexical Imports"

Lexicality and Optimizability

Traditional optimizations in compilers rely on compile-time knowledge about the program. Usually statically typed langauges like Java and C are rather good at that, and dynamic languages like Perl 5, ruby and python are not. Perl 6 offers the flexibility of dynamic languages, but tries to provide much optimizability nonetheless by gradual typing, that is […]

Read more "Lexicality and Optimizability"