rubymotion-style-guide icon indicating copy to clipboard operation
rubymotion-style-guide copied to clipboard

snake_case v. camelCase

Open mattgreen opened this issue 12 years ago • 4 comments

snake_case

  1. Standard Ruby
  2. Already in use in a lot of gems
  3. Differentiation is nice when using iOS APIs (can clearly tell what is Ruby/iOS)

camelCase

  1. Standard iOS style
  2. Always present in some form, whether it's controllers or CocoaPods
  3. Unifies iOS/RubyMotion code, preventing style from changing mid-method

FIGHT :beers:

mattgreen avatar Jul 29 '13 23:07 mattgreen

HEY! https://github.com/kemiller/rubymotion-style-guide/issues/2

jamonholmgren avatar Jul 30 '13 00:07 jamonholmgren

Actually, yours has a better description.

jamonholmgren avatar Jul 30 '13 00:07 jamonholmgren

snake_case, but really confusing when mixing up with iOS frameworks or CocoaPods libs. Shouldn't RubyMotion allow us to decide? i.e. providing us with tableView(tableView, cellForRowAtIndexPath: indexPath) as well as table_view(table_view, cell_for_row_at_index_path: index_path). It's less Googleable though...

ivdma avatar Sep 10 '15 13:09 ivdma

@ivdma just use https://github.com/jamonholmgren/viper.

:laughing:

jamonholmgren avatar Sep 10 '15 16:09 jamonholmgren