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
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introdução a CoffeeScript
Palestra para o RSJS 2012 (
http://rsjs.org
)
Ricardo Tomasi
March 03, 2012
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
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
660
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
380
A2UI という光を覗いてみる
satohjohn
1
130
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
dRuby over BLE
makicamel
2
330
Vite+ Unified Toolchain for the Web
naokihaba
0
290
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.4k
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
140
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
220
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
180
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
380
Are puppies a ranking factor?
jonoalderson
1
3.5k
Why Our Code Smells
bkeepers
PRO
340
58k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
55k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Documentation Writing (for coders)
carmenintech
77
5.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
770
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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