ruby的第一印象

看了第一眼的ruby in a nutshell,说一下对这个语言的第一印象吧。

1 OO,完全是面向对象的,以至于连数组这么基本的类型都有.each方法

2 语法看得不爽。ruby没有用”{“和”}”,取而代之的是在语句块结尾用”end”进行标记,这个看得实在有点受不了。

作者说ruby的语法和java之类的很相像,我看不尽然,抛出异常用rescue之类的。

不过我也就看了一页而已,希望以后它给我的印象能更加好一点。

Leave a Reply

Your email address will not be published. Required fields are marked *


Fatal error: Uncaught Error: Call to undefined function imagecreate() in /backups/wordpress/wordpress/wp-content/plugins/captcha-code-authentication/wpCaptcha.php:506 Stack trace: #0 /backups/wordpress/wordpress/wp-content/plugins/captcha-code-authentication/wpCaptcha.php(330): WP_Captcha_Code::generate_captcha_image() #1 /backups/wordpress/wordpress/wp-includes/class-wp-hook.php(324): WP_Captcha_Code::captcha_comment_form() #2 /backups/wordpress/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #3 /backups/wordpress/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action() #4 /backups/wordpress/wordpress/wp-includes/comment-template.php(2847): do_action() #5 /backups/wordpress/wordpress/wp-content/themes/twentysixteen/comments.php(77): comment_form() #6 /backups/wordpress/wordpress/wp-includes/comment-template.php(1629): require('...') #7 /backups/wordpress/wordpress/wp-content/themes/twentysixteen/single.php(24): comments_template() #8 /backups/wordpress/wordpress/wp-includes/template-loader.php(106): include('...') #9 /backups/wordpress/wordpress/wp-blog-header.php(19): require_once('...') #10 /backups/wordpress/wordpress/index.php(17): require('...') #11 {main} thrown in /backups/wordpress/wordpress/wp-content/plugins/captcha-code-authentication/wpCaptcha.php on line 506