Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introdução a CoffeeScript
Search
Ricardo Tomasi
March 03, 2012
Programming
210
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
Transcript
40 slides
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
More Decks by Ricardo Tomasi
See All by Ricardo Tomasi
Construindo aplicações web com Backbone e Node.js
ricardobeat
3
120
Impressoras 3D
ricardobeat
0
150
Other Decks in Programming
See All in Programming
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
210
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
690
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.1k
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
360
AI Augmentation Techniques with Liberty
ivargrimstad
1
530
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
220
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
150
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
9.4k
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
310
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
140
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
640
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
60k
How GitHub (no longer) Works
holman
316
150k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
990
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Balancing Empowerment & Direction
lara
6
1.4k