For example, many JVMs are sophisticated enough to recognize that a block of code being looped over constitutes "hot" code, even if there's only a single call to the method that contains that block.
例如,许多先进的编译器可以识别出构成“热”代码的循环代码块,即使它只包含对包含方法的一个调用。
Because the entire body of the method is a single block, I can define and use local variables within the body without any problems.
因为整个方法是一个块,所以我可以毫无问题地在正文中定义并且使用局部变量。
The respond_to method accepts a single code block and passes one instance variable (labeled wants) into the code block.
respond _ to方法接受单个代码块,并传递一个实例变量(标为wants)到代码块。
应用推荐