-
Notifications
You must be signed in to change notification settings - Fork 6
Comments
Shane Brinkman-Davis Delamore edited this page Mar 29, 2018
·
9 revisions
The standard comment in many 'scripting' langauges, hashtag-to-EOL (end-of-line), are supported with one caveat: they must be followed by whitespace(s).
# a comment
#
# The line above is also a comment
color = #FF0 # <- #FF0 is a string
##
Everything indented after a double ## is a comment.
Even #, ##, ###, /* and */.
##
Hooray! This means you can block-comment-out another block-comment.
You can't have block-comments-within-block-comments in:
C/C++, Java, JavaScript, Ruby, CoffeeScript,
Objective-C, Swift, Python, Perl...
You can kind-of do it in the Clojure language, but Clojure doesn't
have true block-comments. Clojure's (comment ...) macro is
nestable, but it can't contain arbitrary text. Still, Clojure
macros are cool. Kudos to Clojure, for a clever combination
of macros and comments.
##Also, this is a comment
## This is a comment
##This
and this
are comments.
- Home
- Get Started
- Benefits
- Highlights
- Productivity by Design
- CaffeineScript Design
- What is CaffeineScript Good For?
- Get the most out of JavaScript
- Language Comparison
- CHANGELOG
- Blocks Instead of Brackets
- Binary Line-Starts
- Everything Returns a Value
- Streamlined Modules
- Scopes and Variables
- Optional Commas
- Semantics
- Ambiguities