delphi のダメな所

23
Copyright © 2014 SERIALGAMES inc.. All Rights Reserved. Delphi の残念なとこ! 2014/08/23 @pik Happy Creation, Play the Development!

Upload: jun-hosokawa

Post on 17-Jan-2015

1.361 views

Category:

Software


0 download

DESCRIPTION

2014-08-23 の LL Diver で使ったスライドです。

TRANSCRIPT

Page 1: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc.. All Rights Reserved.

Delphi の残念なとこ!

2014/08/23 @pik

Happy Creation, Play the Development!

Page 2: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc.. All Rights Reserved.

自己紹介

Page 3: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc.. All Rights Reserved.

※ツイートの引用について了承済み

Page 4: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc.. All Rights Reserved.

\ / \ 丶 i. | / ./ / \ ヽ i. .| / / / \ ヽ i | / / / \ -‐ ー __ わ た し で す -- 二 / ̄\ = 二  ̄ | ^o^ |  ̄ -‐ \_/ ‐- / / ヽ \ / 丶 \ / / / | i, 丶 \ / / / | i, 丶 \

Page 5: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc.. All Rights Reserved.

普段は Android/iOS のアプリを組んだり、Win/OSX の開発したりしてます。

Delphi で!

twitter: @pik

Page 6: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc.. All Rights Reserved.

先に言っておきます

Page 7: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 7

Happy Creation, Play the Development! はじめに

Delphi 大好き

Page 8: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 8

Happy Creation, Play the Development!

あくまでも 個人的な 見解です!

Page 9: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 9

Happy Creation, Play the Development!

★ ★ Delphi ランキング ★

Page 10: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 10

Happy Creation, Play the Development!

Page 11: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 11

Happy Creation, Play the Development!

Page 12: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 12

Happy Creation, Play the Development!

無名関数定義がめんどい!

type

TFoo = reference to procedure of object; procedure Bar(Foo: TFoo); begin end; begin Bar( procedure begin // DO SOMETHING end; ); end;

長ぇwww

訂正 of object いりませんでした!むしろ書けない! 短くなった!?……いや、そういう事でなく、 reference to 構文が長いって話です。 lyna 氏、ご指摘ありがとうございます。

https://twitter.com/lynatan/status/503193343338094593

Page 13: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 13

Happy Creation, Play the Development!

Page 14: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 14

Happy Creation, Play the Development!

循環参照めんどい!

unit A; interface uses B; implementation end.

unit B; interface uses A; implementation end.

Page 15: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 15

Happy Creation, Play the Development!

Page 16: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 16

Happy Creation, Play the Development!

文字列インデックスが!

// 今まで Str := 'ABC'; Writeln(Str[1]) // 結果:A // NEWGEN コンパイラ Str := 'ABC'; Writeln(Str[1]) // 結果:B

0 based に!

Page 17: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 17

Happy Creation, Play the Development!

Page 18: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 18

Happy Creation, Play the Development!

プリミティブがあるよ!

// プリミティブ var Int: Integer; // 整数型 Car: Cardinal; // 符号無し整数 Chr: Char; // 文字型 Str: String; // 文字列型 Bol: Boolean; // 真理値 Set: set of TAnsiChar; // 集合型 などなど

Page 19: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 19

Happy Creation, Play the Development!

レコードヘルパ!

// プリミティブにメソッドを加える小手先技! type TStringHelper = record helper for String public property Chars[Index: Integer]: Char read GetChars; end; TIntegerHelper = record helper for Integer public function ToString: String; end;

Page 20: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 20

Happy Creation, Play the Development!

Page 21: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 21

Happy Creation, Play the Development!

ローカル変数定義がめんどい!

var Foo: Integer; begin // こんな風に書きたい! var Foo: Integer = 0; end;

Page 22: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 22

Happy Creation, Play the Development!

Page 23: Delphi のダメな所

Copyright © 2014 SERIALGAMES inc. All Rights Reserved. PAGE 23

Happy Creation, Play the Development!

名前が揺らいでる!

Object Pascal ↓

Delphi Language ↓

Object Pascal 戻ったwww