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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
190
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
180
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
4
3.8k
Python札幌 LT資料
t3tra
7
1.1k
高速開発のためのコード整理術
sutetotanuki
1
290
CSC307 Lecture 05
javiergs
PRO
0
480
組織で育むオブザーバビリティ
ryota_hnk
0
130
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
380
gunshi
kazupon
1
140
.NET Conf 2025 の興味のあるセッ ションを復習した / dotnet conf 2025 quick recap for backend engineer
tomohisa
0
120
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
190
CSC307 Lecture 03
javiergs
PRO
1
480
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
420
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
77
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
250
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
140
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Abbi's Birthday
coloredviolet
1
4.5k
What's in a price? How to price your products and services
michaelherold
247
13k
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