kemiller / rubymotion-style-guide

A community-driven RubyMotion coding style guide
18 stars 2 forks source link

snake_case v. camelCase #3

Open mattgreen opened 11 years ago

mattgreen commented 11 years ago

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:

jamonholmgren commented 11 years ago

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

jamonholmgren commented 11 years ago

Actually, yours has a better description.

ivdma commented 8 years ago

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...

jamonholmgren commented 8 years ago

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

:laughing: