-
Sufficiently Advanced Technologies, Damian Conway
2004-07-30 11:37 in /tech/oscon
Preable: big “thank you” to Larry Wall for making this all possible. If everyone in this room got their company to donate $500 to The Perl Foundation, it would be more than enough to keep Larry working on Perl for the whole year.
Desire from someone: implicit
$self->for method calls inside a class module. Sub::CallAsMethod does this. Very simple. Very magical. Probably evil.This talk is about modules that are indistiguishable from magic.
hmm... blah blah blah... Harry Potter jokes without end...
Modules which do magic without any user interaction aren’t new. Most famously,
use strict. More recently, IO::All. But, maybe not magical enough...use IO::All:Pulp::Fiction my @horrors = <~/foo.txt>
Lots of stuff in the Perl6:: namespace.
How can mere mortals write S.A.T.? Find the clunky bits of your code and do something about it! IO::Prompt was pretty cool, but originally needed too many flags. Changed to autochomp by default and autodetect boolean context.
Why can’t comments be more useful and interactive? Progress module presented last year weren’t simple enough to use. Solution, smart comments:
use Smart::Comments while ( ... ) { ### Preparing--->done do_work }also provides checks and assertions.
Wrapped up with Lingua::EN::Autoinflect, which is like Lingua::EN::Inflect, but with no interface, just works.
Takeaway: look at the interface of your modules. What could you remove? What could you just infer? Could you have better defaults? Could you use objects with overloaded operators to acheive things with more natural usage?
Leave a comment
Please use plain text only. No HTML tags are allowed.
Comments are closed for this story.
Trackbacks are closed for this story.