internetsistemas / guides

A guide for programming gracefully.
25 stars 13 forks source link

What about blank methods? #17

Closed brunoocasali closed 9 years ago

brunoocasali commented 9 years ago

The title says everything!

What about blank methods?

Reading ruby-awesome I find below this subtitle: "One exception to the rule are empty-body methods."

def show; end

instead of:

def show
end

Should be inside this guide: https://github.com/internetsistemas/guides/tree/master/style-guides/ruby

felipefontoura commented 9 years ago

Thanks @brunoocasali :+1: @gabrieljt what do you think?

brunoocasali commented 9 years ago

Oh, I forgot the label :|

lcezermf commented 9 years ago

Nice :+1: , I think the same about empty classes

class Customer; end

instead of

class Customer
end
brunoocasali commented 9 years ago

Yeah, I'm too @lccezinha not the version proposed for Ruby Awesome:

FooError = Class.new(StandardError)

I think about it how: "adding lot of complexity in nothing" kkkk

Thanks!

felipefontoura commented 9 years ago

So far so good @brunoocasali!!

@lccezinha thanks for your comment ;)

brunoocasali commented 9 years ago

Thanks @felipefontoura and @lccezinha :+1: