The example is illustrative, and a ruby code in the wild will generally use positional arguments or pass hashes around, rather than implementing weirdly named methods:
That is not to say weirdly named methods aren't used. Activerecord dynamic finders are one example that comes to mind `Model.find_by_first_name_and_last_name`, but they are named so to provide information to method_missing hook.
> If you need to pass multiple blocks to a method in Ruby it always looks clunky and probably that's why it's not a common idiom:
I don't think the examples are clunky at all. It is similar in all languages which treat functions as first class datatypes.
In ruby, you use "one block" or pass multiple lambdas. It isn't any different from smalltalk example, except for superficial syntactic difference.
> When you start writing a new app in Smalltalk you don't open Emacs or RubyMine you launch a VM.
I don't know much about Smalltalk, but this IDE/VM approach must be damn substantive to make up for not using Vim. The way the article puts it makes it sounds like "don't open Emacs" is a positive, which is seldom the case with people who use a lot of emacs/vim.
I don't know much about Smalltalk, but this IDE/VM approach must be damn substantive to make up for not using Vim.
The thing about the IDE, is that there's hardly any of it there. It's all just objects that each effectively have their own REPL, and you're directly manipulating all of them.
You can actually start writing a debugger in most Smalltalk environments, and you'll have something that lets you browse a stack trace in under 5 minutes. (If you know the API for dealing with stack traces. A newb or someone out of practice will take longer, but most of it will be reading the API.)
An engineer I know was bored in his "Intro to Smalltalk" class and spent 10 minutes writing a tool that compiles and evaluates code. The exact same code made it into the production "IDE" and was there for over a decade.
The thing is, there's such an amazing amount of "integration" in the environment, you'd think there was tons of ingenious code written by teams of geniuses, but there isn't. It's just that a lot of unnecessary stuff has been removed and made runtime, so everything is available for you to see and change.
It's one of the best examples of how minimalism can work very well.
> If you need to pass multiple blocks to a method in Ruby it always looks clunky and probably that's why it's not a common idiom:
I don't think the examples are clunky at all. It is similar in all languages which treat functions as first class datatypes.In ruby, you use "one block" or pass multiple lambdas. It isn't any different from smalltalk example, except for superficial syntactic difference.
> When you start writing a new app in Smalltalk you don't open Emacs or RubyMine you launch a VM.
I don't know much about Smalltalk, but this IDE/VM approach must be damn substantive to make up for not using Vim. The way the article puts it makes it sounds like "don't open Emacs" is a positive, which is seldom the case with people who use a lot of emacs/vim.