The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Simpler and simpler

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Adam Green

Posts: 102
Nickname: darwinian
Registered: Dec, 2005

Adam Green is the author of Ruby.Darwinianweb.com
Simpler and simpler Posted: Jan 9, 2006 8:11 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Adam Green.
Original Post: Simpler and simpler
Feed Title: ruby.darwinianweb.com
Feed URL: http://www.nemesis-one.com/rss.xml
Feed Description: Adam Green's Ruby development site
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Adam Green
Latest Posts From ruby.darwinianweb.com

Advertisement
Here is a perfect example of how I keep learning how to make my Ruby code simpler over time. I just found out that I can use
filetext = File.read("filename")
instead of
file = File.open("filename")
filetext = file.read
file.close
I'm not pointing this out as a criticism. Ruby clearly aims for the greatest simplicity while still retaining power. This is exactly what I want in a language. I just keep realizing that I need to read the library docs every chance I get.

Read: Simpler and simpler

Topic: Keeping your home clean with "mess" Previous Topic   Next Topic Topic: Ruby on Rails Sucks

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use