017 RR What’s Wrong with Ruby?

by Charles Max Wood on September 7, 2011

Panelists

Discussed in this Episode

  • Rubinius
  • RubySpec
  • Testing
  • Test::Unit
  • RSpec
  • Cucumber
  • Levels or Ruby
    • Language
    • Implementation
    • Community/Culture
    • Ecosystem
  • Assignment to something that could be a local variable or a setter method
  • Having more than one way to do things
  • map vs collect
  • and vs &&
  • aliases
  • alias method chain
  • copy on alias
  • when you alias a method, then alias its aliases for consistency
  • in some cases ruby is white space sensitive
  • ruby’s complex grammar
  • documentation
    • How much documentation do we need if we can open the source of our projects?
  • speed
    • Generally takes an architecture change to get better.
  • the Ruby Application Archive (RAA)

Picks

11 comments
Valentine
Valentine

* what song is playing in the background?

Valentine
Valentine

Sorry for offtopic question, but song is in the background? (It is not “Not Your Choice” by Wetnurse)

Gordon
Gordon

Charles, please turn off the music before asking the panelists to introduce themselves... Thanks!

Rafamvc
Rafamvc

The music in the beginning was way too loud!!! It was hard to understand what you guys were saying :)

Johan
Johan

Agreed! And, it sounded like a 3-doors-down rip-off.

horsey
horsey

Josh Susser made a fool of himself by continually insisting (totally incorrectly) that `var = 10` may sometimes be interpreted as setter call. He wasted like 15 mins of everyone's time trying to make this stupid point even after he was told by a language IMPLEMENTER (brixen) that it's always a local assignment. What a dork.

Jonathan Rochkind
Jonathan Rochkind

However, it does, I think, suggest some problems with consistency/"least surprise" in ruby. How come "foo" can be a local variable rvalue or a method call depending on whether a local variable or method in self (or both) is defined ; and obj.foo= is a method call; but "foo=" is never a method call (but "self.foo=" always is). This isn't what I expected either until I tried it out, it's kind of inconsistent semantics, with when the "self." can be implied and when it can't be.

horsey
horsey

I think it's fairly straight forward (though not necessarily obvious at first blush) method vs locals --- locals always win. why is `foo = 10` ALWAYS a local assignment and not a setter invocation? because if it could be a setter invocation it would be IMPOSSIBLE ever to set a local of that name (if a method by that name also exists). And since they dont want to make it impossible to set a local, they decide that the way to invoke a setter is always using an explicit receiver. Yes it requires some thinking, but IMO it makes sense, and is the only reasonable option.

David Backeus
David Backeus

Assets in Rails 3.1 are completely optional and will not be on by default if you just bundle update your current Rails app. Personally I'm chilling on 3.0.10 for the time being as well though, they changed some stuff with Rack::Test::UploadedFile that I don't feel like dealing with in my specs atm.

David Backeus
David Backeus

I believe James is correct that 'var = something' is ALWAYS setting a local variable. Or could anyone point out a situation when it's not?

Phil
Phil

$var = something ;)

Trackbacks

  1. [...] RR 017: What’s Wrong with Ruby? [...]

Previous post:

Next post: