Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introdução a CoffeeScript
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ricardo Tomasi
March 03, 2012
Programming
1
190
Introdução a CoffeeScript
Palestra para o RSJS 2012 (
http://rsjs.org
)
Ricardo Tomasi
March 03, 2012
Tweet
Share
More Decks by Ricardo Tomasi
See All by Ricardo Tomasi
Construindo aplicações web com Backbone e Node.js
ricardobeat
3
110
Impressoras 3D
ricardobeat
0
140
Other Decks in Programming
See All in Programming
ぼくの開発環境2026
yuzneri
0
220
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
Oxlint JS plugins
kazupon
1
930
CSC307 Lecture 03
javiergs
PRO
1
490
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
610
CSC307 Lecture 01
javiergs
PRO
0
690
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1371
200k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Odyssey Design
rkendrick25
PRO
1
490
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Music & Morning Musume
bryan
47
7.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
30 Presentation Tips
portentint
PRO
1
210
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Technical Leadership for Architectural Decision Making
baasie
1
240
New Earth Scene 8
popppiees
1
1.5k
Transcript
None
@ricardobeat about.me/ricardotomasi
None
"CoffeeScript is an attempt to expose the good parts of
Javascript in a simple way"
Características - indentação obrigatória - tudo é uma expressão -
é apenas javascript - mapeamento 1 x 1 (ideal) - não é um superset do javascript
Variáveis e escopo - sem “var” - variable safety -
globais explícitas
Funções - parâmetros entre parênteses - seta - corpo da
função
Funções
Funções splats defaults
Objetos - { ... } opcionais - vírgulas opcionais -
protege nomes reservados
Arrays indexOf
Range literals, slicing, splicing
Array de objetos
Condicionais
Loops e compreensões
None
Loops e compreensões
Haskell
Ruby
Javascript
None
Dart
Operadores aliases
Outros this prototype
Operadores
Operadores existential operator
Operadores conditional assignment
Operadores chained comparisons
Strings interpolação
Strings
Strings multi-linha
Expressões regulares
jQuery
None
Classes
outros exemplos passed = [] failed = [] (if score
> 60 then passed else failed).push score for score in [49, 58, 76, 82, 88, 90] console.log "Happy Birthday #{if i is 3 then "dear Robert" else "to You"}" for i in [1..4] http://rosettacode.org/wiki/Category:CoffeeScript
Debug erros apontam para o source javascript futuro: source-mapping
Como usar 1. instalar node.js (?) 2. npm install coffee-script
-g
None
Demo http://192.168.254.109:8080