Earlier quoted context omitted.
Not so different in Ruby: for x in 1..10; print x end
Yes, but we all know that Ruby is the haven of Devils!!
Ruby Is The Future
41–50 of 56 posts
Re: Ruby Is The Future
#42Re: Ruby Is The Future
#43Earlier quoted context omitted.
Which version of C# are you thinking of? In C# 3, the verbosity level is much less than in C# 2, where it's slightly less than C# 1. I don't see where Ruby syntax is particularly more concise than C# 3's. Well, let me clarify "particularly". I don't find myself feeling like I'm suffering under C#'s syntax, relative to Haskell's. It has about the same amount of syntactic overhead: writing types for method parameters,…
"I don't see where Ruby syntax is particularly more concise than C# 3's." 1.upto(10).each{|x| print x} I'm curious - how would you print 1 through 10 in C# 3 by comparison?
(1).UpTo(10).ForEach(x => Console.WriteLine(x));
Of course, "UpTo" requires first extending int, which is trivial: public static class IntExtensions {
public static List UpTo(this int start, int end) {
var range = new List();
for(int i = start; i Re: Ruby Is The Future
#44Earlier quoted context omitted.
Which version of C# are you thinking of? In C# 3, the verbosity level is much less than in C# 2, where it's slightly less than C# 1. I don't see where Ruby syntax is particularly more concise than C# 3's. Well, let me clarify "particularly". I don't find myself feeling like I'm suffering under C#'s syntax, relative to Haskell's. It has about the same amount of syntactic overhead: writing types for method parameters,…
"I don't see where Ruby syntax is particularly more concise than C# 3's." 1.upto(10).each{|x| print x} I'm curious - how would you print 1 through 10 in C# 3 by comparison?
for i in range(1,11): print i
Python FTW? ;)Re: Ruby Is The Future
#45"There needs to be a special term for an attempt at an April Fool's Day Joke, which is in all of its points true and then ends up looking like a joke made by an author at his own expense."
http://www.reddit.com/r/ruby/comments/8966h/ruby_is_the_futu...
Re: Ruby Is The Future
#46Earlier quoted context omitted.
"I don't see where Ruby syntax is particularly more concise than C# 3's." 1.upto(10).each{|x| print x} I'm curious - how would you print 1 through 10 in C# 3 by comparison?
C# 3: (1).UpTo(10).ForEach(x => Console.WriteLine(x)); Of course, "UpTo" requires first extending int, which is trivial: public static class IntExtensions { public static List UpTo(this int start, int end) { var range = new List (); for(int i = start; i
p *1..10
Edit: you may need to do a "require 'pp'" first.Re: Ruby Is The Future
#47Re: Ruby Is The Future
#48Earlier quoted context omitted.
I love Ruby. I love that code can be so short and yet easily readable. It might be slower and perhaps more memory-hungry than other languages, but for my needs that's usually not an issue. What I do miss are good, well documented , stable libraries. For example, I currently process RSS/Atom feeds with FeedTools, whose own creator says he's tired of maintaining (I totally understand him and am extremely thankful for t…
"I mean stuff like having better documentation, for example, online, free, in googleable format" Do you mean for the core language? Are you not happy with http://www.ruby-doc.org/ ?
Here again I think it's interesting to compare to PHP's annotated docs ca. 2000, which were a great resource since they usually contained a few common usage examples for every function. The language itself was less consistent and mature than Ruby, but the user contributed (pre-Web 2.0! ;)) docs made up for it.
Re: Ruby Is The Future
#49Earlier quoted context omitted.
I don't really know Python's community that well, but I would wager it's probably due to sheer size. I disagree with PG's "law of averages" regarding choosing environments - working in a language that has more users does have significant benefits in my opinion. BTW another example that comes to mind regarding beginner-friendliness is how long it took to get Rails working with Apache. Before Phusion you were supposed…
I, for one, thought that the popularization of the "Fuck Apache" mindset was one the most positive results of Rails' ascendancy. I don't like Rails, but I hate Apache.
Re: Ruby Is The Future
#50Earlier quoted context omitted.
Which version of C# are you thinking of? In C# 3, the verbosity level is much less than in C# 2, where it's slightly less than C# 1. I don't see where Ruby syntax is particularly more concise than C# 3's. Well, let me clarify "particularly". I don't find myself feeling like I'm suffering under C#'s syntax, relative to Haskell's. It has about the same amount of syntactic overhead: writing types for method parameters,…
"I don't see where Ruby syntax is particularly more concise than C# 3's." 1.upto(10).each{|x| print x} I'm curious - how would you print 1 through 10 in C# 3 by comparison?
1 to 10 foreach println
Which seems more concise than the equivalent Ruby to me. Feh.