-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathREADME.FIRST
69 lines (43 loc) · 2.15 KB
/
README.FIRST
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
=BioPerl 6 (bioperl-experimental)=
The experimental classes in this directory are test implementations for Perl 6.
Most of these are similar to perl5-based BioPerl with simple Perl 6
translations. Hear thar be dragoons.
=Notes on Perl 6=
Perl 6 is a specification and thus can represent multiple implementations. We
recommend strictly following the Perl6 spec, defined in a series of synopses:
http://design.perl6.org/
Note that much of the specification is still in flux or is unfinished; much of
this is due to changes from experimenting with several preliminary Perl 6
implementations, such as Pugs or Rakudo (Perl 6 on Parrot), and parsing Perl 6
using Larry Wall's STD.pm grammar.
Once the Perl 6 specification is considered complete, BioPerl 6 would then be
expected to run on any Perl 6 implementation passing the official Perl 6 test
suite. Until then, we will recommend the latest Parrot build from subversion
along with the latest Rakudo checkout (currently packaged with Parrot but soon
to be located in a separate repository).
=Chris's Notes=
==Interfaces vs Classes==
In general, I am defining strict interfaces as roles and interface
implementations as classes. This is due to several interfaces actually defining
methods that are common to all implementations.
Defining interfaces as roles has a specific advantage, as roles can be mixed-in
per instance at runtime or class-wide at compile time:
# compile-time
class Bio::PrimarySeq is Bio::Root::Root does Bio::RangeI {
}
# runtime mixin
my $seq = Bio.PrimarySeq.new();
my $seq does Bio::AnnotatableI;
==Class Methods==
Multiple dispatch. Named/positional/required/optional/slurpy/invocant
parameters. Type checking. Variable return contexts (scalar, list, hash, etc.).
==Named parameters==
Named parameters/arguments are now part of the Perl6 specification and can be
passed using comma notation or using Pairs:
my $seqobj = Bio::PrimarySeq.new(seq => $rawseq, description => $desc, :alphabet<dna>);
Note that this diverges from perl5-based BioPerl conventions, where named arguments are
prefixed with a dash ('-') character.
==Getter/Setters==
==Class Methods==
==Tests==
None yet (soon to be added)