Black and White

Download Report

Transcript Black and White

Perl
By
Warren David Cocke
Greg Wallace
Josh Johnson
Perl

Object-Oriented

Procedural

Functional

Developed as a Writing Tool
Perl History

Developed By Larry Wall

1987

Originally used to extracting text information

1989, Perl 3.0 Released Open Sourced
Perl Development

It was developed as a glue language

1991, Perl 4 released with first book
“Programming Perl”



1994, Perl 5 released with major changes
Perl 5 added objects, perldoc, and new
functions
It became “duct tape of the Web”
Perl 5 Concepts

Object-Oriented Programming

Classes

Objects

Methods

Modules

64 bit support

Still used today
Perl 6 Concepts

Being Developed

Lazy Evaluation


Junctions: values that are composites of other
values
Autothreading: Compiler can choose to
evaluate junctive expressions in parallel
Perl 6 Concepts

Multimethods

Roles – like interfaces in Java

Macros
Example Program
use Backpack;
use Items;
my $bag = Backpack->new(color => 'red'); # Creates a new Object
$bag->add_items(
Candle->new,
Spellbook->new,
Sandwich->new,
); # Adds Objects to the backpack object
Comparison
Java




Requires Java
Environment
Requires a compiler
Works well in multithread applications
Great for Distributed
Applications
Python


Whitespace
Indentation
Object-Oriented and
Functional

Easier to Read

General Purpose