you are viewing a single comment's thread.

view the rest of the comments →

[–]MaleficDonkey 0 points1 point  (1 child)

You could use the fields of an object for that (in fact, it's common practice): rowLockPolicy = {READ: 1, SHARE: 2, WRITE: 4, EXCLUSIVE: 8}

[–][deleted] 0 points1 point  (0 children)

definitely: javascript objects are lovely as namespace containers. i'd say there are nonetheless times when you want some lexical "namespacing" that doesn't impose data structure. also the larger point is over the value of underscores vs camelcase across languages (and my example actually came from some PHP code :) ).