1. Yuichi Yoshida
Chief engineer, DENSO IT Laboratory, Inc.
@sonson_twit
? 2014 DENSO IT Laboratory, Inc., All rights reserved. Redistribution or public display not permitted without written permission from DENSO IT Laboratory, Inc.
オールドタイプの奮闘
Programming Swift 2 (& LLDB) シンポジウム
Swiftをどうやって勉強するか
6. たとえば,C→Ruby
int length = 10;
int *array = (int*)malloc(sizeof(int) * length);
// initialize array
for (int i = 0; i < length; i++) {
printf("%dn", array[i]);
}
free(array);
朝飯前だ!
7. たとえば,C→Ruby
var array = [10, 2, 3, 4, 5, 5, 2]
array.each{|e|
puts e
}
var array = [10, 2, 3, 4, 5, 5, 2]
for i in 0...array.count
puts array[i]
end
Before breakfast!
直訳
Piece of cake!
意訳