Jaebi의 Binary는 호남선

Swift와 Dart 문법 차이 본문

공부

Swift와 Dart 문법 차이

jaebijae 2024. 6. 12. 05:22

 

 
  Dart Swift
Type Annotation `Double myDouble` `let myDouble: Double`
String declaration `String myString = 'hi'` `var myString: String =  "hi"`
String interpolation `'${value}'` `“\(value)"`
Function `String greet(String msg) {}` `func greet(msg: String) -> String {}`
Function with implicit return `String greet() => "hi"` `func greet() -> String {"hi"}`
Schedule code to be executed when current scope is exited `defer` `finally`

 

'공부' 카테고리의 다른 글

TDD - Test Driven Development  (0) 2024.06.01
Flutter - Isolate & Event Loop  (0) 2024.06.01
Behavioral Patterns - Template  (0) 2024.06.01
Behavioral Patterns - Adapter  (0) 2024.06.01
Structural Patterns - Adapter  (0) 2024.06.01