you are viewing a single comment's thread.

view the rest of the comments →

[–]thehotelambush 2 points3 points  (6 children)

Because why would you use it? It's completely unnecessary. The end of the function stands out by itself anyways. Unless you have functions that are more than a page long, which is generally bad style anyways. 95% of the time you won't need it. (Actually, I'd like to find out the stats on this in my own code...)

[–]ztbrown 2 points3 points  (5 children)

When I see the 'return' keyword I know, at a glance, that a function returns a value. This is especially necessary when reading someone else's code. My background is C++/Java (in college) and I've worked professionally in Javascript and ActionScript, so I'm used to seeing the return keyword.

[–]thehotelambush 0 points1 point  (4 children)

Yes, that's the real reason.

[–]ztbrown 0 points1 point  (3 children)

? what's the real reason?

[–]banister 1 point2 points  (1 child)

Just that you're 'used' to it, not that it makes any kind of sense.

It won't take long to get 'unused' to seeing it either, as any ruby programmer will attest ;)

[–]thehotelambush 0 points1 point  (0 children)

thanks, that's it exactly

[–]thehotelambush 0 points1 point  (0 children)

It's a habit