
{"id":399,"date":"2010-01-02T23:27:46","date_gmt":"2010-01-03T04:27:46","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=399"},"modified":"2010-01-02T23:27:46","modified_gmt":"2010-01-03T04:27:46","slug":"ruby","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=399","title":{"rendered":"Ruby"},"content":{"rendered":"<p>I&#8217;ve got a Ruby book &#8220;The Ruby Programming Language&#8221; by Flanagan and Matsumoto (or should I say <i>the<\/i> Ruby book?) as a New Year present. I am only starting the reading, so I am going to keep my comments here. This is what I have so far:<\/p>\n<p>&#8211; I don&#8217;t like the &#8220;end&#8221; keyword. It is so Pascal \ud83d\ude42 I would either do away with it altogether, like in Python or come up with something shorter like in C<\/p>\n<p>&#8211; I like a lot the embedded expressions for string formatting: <code>\"I have #{count} symbols\"<\/code> is so much better than <code>String.Format(\"I have {0} symbols\", count);<\/code>.<\/p>\n<p>&#8211; I am on the fence about &#8220;if&#8221; and &#8220;unless&#8221; modifiers that come <i>after<\/i> the expression, as in<br \/>\n<code>Raise Invalid, \"x is too big\" unless x<10<\/code>. It might be closer to the natural language, but overall I don't think this is such a good idea, especially for longer expressions.<\/p>\n<p>- I am somewhat puzzled by the octal notation in the character literals. E.g. <code>\"\\010\"<\/code> means ASCII character 8. Who uses octal in the 21<sup>st<\/sup> century?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve got a Ruby book &#8220;The Ruby Programming Language&#8221; by Flanagan and Matsumoto (or should I say the Ruby book?) as a New Year present. I am only starting the <a href=\"https:\/\/ikriv.com\/blog\/?p=399\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[4],"tags":[],"class_list":["entry","author-ikriv","post-399","post","type-post","status-publish","format-standard","category-hack"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=399"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/399\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}