JOTUBODFGVODUJPO
package Dog;
use Moose;
extends ‘Animal’;
sub print_info {
my ($self) = @_;
printf ‘name=%s\n’, $self->name;
}
1;
Slide 16
Slide 16 text
JOTUBODFGVODUJPO
my $dog = Dog->new;
$dog->print_info;
Slide 17
Slide 17 text
JOTUBODFGVODUJPO
class Dog: Animal {
var name: String = “”
func print_info() {
println(“name=\(self.name)”)
}
}
Slide 18
Slide 18 text
JOTUBODFGVODUJPO
var dog = Dog()
dog.print_info()
Slide 19
Slide 19 text
େମΠϝʔδΘͬ
ͨͰ͠ΐ͏͔
Slide 20
Slide 20 text
࣮ࡍʹ4XJGUͷ΄͏͕ΊͪΌ
ͪ͘Όػೳ๛ͳͷͰɺ͜ͷ
Γํʹແཧ͕͋Γ·͢ স
Slide 21
Slide 21 text
1FSM͍͕4XJGUʹདྷͯ
ҧײͷͳ͍࠷େͷϙΠϯτ
Slide 22
Slide 22 text
ϦϑΝϨϯεΧϯτ
ํࣜ
Slide 23
Slide 23 text
1FSMͰΑ͘Δϛε
my $t = AnyEvent->timer(
after => 10,
cb => sub {
$self->do_something;
},
);
Slide 24
Slide 24 text
1FSMͰΑ͘Δϛε
my $t = AnyEvent->timer(
after => 10,
cb => sub {
$self->do_something;
},
);
Slide 25
Slide 25 text
1FSMͰΑ͘Δϛε
my $t = AnyEvent->timer(
after => 10,
cb => sub {
$self->do_something;
},
);
Scalar::Util::weaken($self);
Slide 26
Slide 26 text
*OTXJGU
var t = Timer(10, cb: {
() -> Void in
self?.do_something()
})
Slide 27
Slide 27 text
*OTXJGU
var t = Timer(10, cb: {
[weak self] () -> Void in
self?.do_something()
})
Slide 28
Slide 28 text
;FSPJOHXFBL
w 4XJGU0CKFDUJWF$ͷXFBLࢀর
;FSPJOHXFBLͱݺΕΔ
w 1FSMͷXFBLࢀরϦϑΝϨϯεΧϯτ͕͞
Εͳ͍͚ͩ
w 4XJGUͷ߹͞ΒʹɺࢀরΧϯτ͕ʹͳΔ
ͱɺXFBLࢀর͍ͯ͠Δม͕ࣗಈతʹOJM
[FSP
ʹͳΔ
Slide 29
Slide 29 text
1FSMʹͳ͍͚ͲॏཁͳͭΒ
w 0QUJPOBMͱ͍͏֓೦
w 1SPUPDPM
Slide 30
Slide 30 text
0QUJPOBMͱ͍͏֓೦
w 4XJGUͰ
WBSGPP4USJOH
ͱఆٛͨ͠มʹ4USJOHҎ֎ೖΕΒΕͳ͍
Slide 31
Slide 31 text
0QUJPOBMͱ͍͏֓೦
w WBSGPP4USJOH
ͱఆٛ͢ΔͱPQUJPOBMʹͳΔ
w OJMPS4USJOH͕ೖՄೳ
Slide 32
Slide 32 text
0QUJPOBMͱ͍͏֓೦
w ΞΫηε͢Δ࣌
w TFMGGPP
OJMͩͬͨ࣌DSBTI
w JGMFUGPPTFMGGPP\
^
͕͓ͬͪ͜͢͢Ί
Slide 33
Slide 33 text
0QUJPOBMͱ͍͏֓೦
w JGMFUCB[TFMGGPP CBS CB[\
^
w 0QUJPOBMΛશ෦ͨͲͬͯ࠷ޙ·ͰOJM͡Όͳ͔ͬ
͚ͨ࣌ͩ
Slide 34
Slide 34 text
0QUJPOBMͱ͍͏֓೦
w TFMGGPP EP@TPNFUIJOH
w GPP͕OJMͩͬͨΒԿ͓͖ͳ͍
Slide 35
Slide 35 text
1SPUPDPM
w (Pͷ*OUFSGBDFΈ͍ͨͳͷ
w 4USVDU1SPUPDPMͰɺ΄Μͱʹ(PΈ͍ͨͳॻ
͖ํՄೳ
Slide 36
Slide 36 text
$1"/$BSUPO
Slide 37
Slide 37 text
$PDPB1PET
Slide 38
Slide 38 text
w DQBOpMF1PEpMF
w DBSUPOJOTUBMM'PP
QPEJOTUBMM'PP
Slide 39
Slide 39 text
ͳΜ͔࡞ΔσϞ
Slide 40
Slide 40 text
ϙΠϯτ
w ࠷ॳ͔ΒᘳͳͷΛ࡞Ζ͏ͱ͠ͳ͍
w ζϧͰ͖Δͱ͜Ζζϧ͢Δ
w ͔͔ࣗͭ͑͠ͳͯ͘ྑ͍
w ඞཁʹͳͬͨͷ͚͍֮ͩ͑ͯ͘ͷָ͕ͩ͠
ʹͭ͘
Slide 41
Slide 41 text
ϙΠϯτ
w ຊ৬ αʔόαΠυ
ͷೳྗΛۦ
w ΫϥΠΞϯταΠυΊͬͪΌखൈ͖Ͱ͖ΔΑ
͏ʹαʔόͰ͕ΜΔ
Slide 42
Slide 42 text
ϙΠϯλ
w ੲͱ͕ͪͬͯใ͕ͦΖ͍ͬͯΔͷͰ
͋Μ·Γۤ࿑͠ͳ͍ͣ
w ެࣜνϡʔτϦΞϧ
4UBSU%FWFMPQJOHJ04"QQT 4XJGU
w Ұ෦ຊޠʹͳͬͯ·͢
IUUQTEFWFMPQFSBQQMFDPNKQEPDVNFOUBUJPO
w ϐϯϙΠϯτʹΓ͍ͨ͜ͱɾ͏ϑϨʔϜϫʔΫ໊ͰάάΔ
ˠ4UBDLPWFSqPX
RJJUB