Opened 13 years ago

Closed 13 years ago

#1662 closed defect (fixed)

JS Style Guide

Reported by: skinner Owned by: Neil Roberts
Priority: lowest Milestone: 0.9
Component: Doc parser Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

On the Dojo coding style guide web page, in the "Quick Reference" section, some of the examples in "Convention" column are confusing:

http://dojotoolkit.org/js_style_guide.html#quick-reference

The style guide uses the words "lower" and "upper" in the capitalization examples. The page includes these examples:

lower
UpperLower
lowerUpper
UPPER_LOWER
_lowerUpper
_upperLower

That seems confusing, since lower sometimes appears capitalized ("Lower" or "LOWER") and upper isn't always capitalized.

Would it be better to just use "foo" and "bar" in the examples instead? Like this:

foo
FooBar
fooBar
FOO_BAR
_fooBar

Or, here's another alternative:

lowercase
CapWords or CamelCase
mixedCase
UPPER_CASE
_mixedCase

The Python style guide uses "mixedCase", "CapitalizedWords?", "lowercase", and "UPPER_CASE_WITH_UNDERSCORES". See http://www.python.org/dev/peps/pep-0008/

Change History (3)

comment:1 Changed 13 years ago by neil

Owner: changed from neil to Neil Roberts

comment:2 Changed 13 years ago by alex

brian, this looks reasonable. You should have editing perms on the new site. Feel free to make the changes and close. If you don't have editing perms, just ping dmachi or tk.

comment:3 Changed 13 years ago by skinner

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.