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
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
95
Impressoras 3D
ricardobeat
0
130
Other Decks in Programming
See All in Programming
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
110
Namespace and Its Future
tagomoris
6
700
rage against annotate_predecessor
junk0612
0
160
機能追加とリーダー業務の類似性
rinchoku
2
1.2k
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
250
Deep Dive into Kotlin Flow
jmatsu
1
310
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
22
12k
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.2k
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
110
TDD 実践ミニトーク
contour_gara
1
290
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
490
Flutter with Dart MCP: All You Need - 박제창 2025 I/O Extended Busan
itsmedreamwalker
0
150
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Into the Great Unknown - MozCon
thekraken
40
2k
Music & Morning Musume
bryan
46
6.8k
Docker and Python
trallard
45
3.6k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Being A Developer After 40
akosma
90
590k
How GitHub (no longer) Works
holman
315
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Bash Introduction
62gerente
615
210k
Code Review Best Practice
trishagee
70
19k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
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