Scala.js allows code written in the Scala programming language to be compiled to JavaScript. It is an alternative JavaScript (AltJS) that allows Scala code to create JavaScript. Some key features of Scala.js include:
- Compiling Scala code to JavaScript that can run in web browsers or with Node.js
- Using familiar Scala concepts like classes, collections, and functions when writing code
- Statically typed for catching errors early and better integration with IDEs
Kazuhisa Kawashima is a computer engineer who was born and raised in Shizuoka prefecture, where he has lived for the past 20 years after periods living in Kanazawa and Tokyo. He discusses why he loves living in Shizuoka, highlighting its mild climate with little snow compared to other parts of Japan, popular sightseeing spots, convenient transportation, production of green tea, and overall "sawayaka" atmosphere.
This document discusses the author's experience with dynamically typed and statically typed programming languages. It summarizes how the author initially disliked dynamically typed languages like JavaScript because errors would not be caught until runtime. However, the author later discovered how TypeScript allows using static typing with Vue, gaining autocomplete and refactoring support while still using modern web technologies. The author encourages applying similar techniques and is looking to hire others interested in working with TypeScript at their company in Shizuoka.
Scala.js allows code written in the Scala programming language to be compiled to JavaScript. It is an alternative JavaScript (AltJS) that allows Scala code to create JavaScript. Some key features of Scala.js include:
- Compiling Scala code to JavaScript that can run in web browsers or with Node.js
- Using familiar Scala concepts like classes, collections, and functions when writing code
- Statically typed for catching errors early and better integration with IDEs
Kazuhisa Kawashima is a computer engineer who was born and raised in Shizuoka prefecture, where he has lived for the past 20 years after periods living in Kanazawa and Tokyo. He discusses why he loves living in Shizuoka, highlighting its mild climate with little snow compared to other parts of Japan, popular sightseeing spots, convenient transportation, production of green tea, and overall "sawayaka" atmosphere.
This document discusses the author's experience with dynamically typed and statically typed programming languages. It summarizes how the author initially disliked dynamically typed languages like JavaScript because errors would not be caught until runtime. However, the author later discovered how TypeScript allows using static typing with Vue, gaining autocomplete and refactoring support while still using modern web technologies. The author encourages applying similar techniques and is looking to hire others interested in working with TypeScript at their company in Shizuoka.
22. Message
type Word struct {
Id int `json:"id"`
Content string `json:"content"`
CreateDate time.Time `json:"create_date"`
UpdateDate time.Time `json:"update_date"`
ReferenceDate time.Time `json:"reference_date"`
}
type Example struct {
Id int `json:"id"`
WordId int `json:"word_id"`
Content string `json:"content"`
CreateDate time.Time `json:"create_date"`
UpdateDate time.Time `json:"update_date"`
}
23. Service
ビジネスロジック
func (o *DicService) AddWordIfNotExist(word *Word) error {
w, err := o.Repo.GetWord(word)
if err != nil {
return err
}
if w == nil {
return o.Repo.AddWord(word)
} else {
return err
}
}