Well ruby can be written in a very boring way if it's what you don't like : # nobody can say he doesn't understand that code , whatever language he is used to
reducer = lambda {|res,val,array| return res+val}
def reduce(array,reducer,initial)
res=initial
for i in 0...array.length
res = reducer.call(res,array[i],array)
end
return res
end
reduce([1,2,4],reducer,0) # => 7
But there is no perfect language which is a good intro to programming. Ruby has all the building blocks needed for teaching programming.And you're pointing namespaces but PHP has the exact same problem. Nothing prevents developpers from using namespaces in their scripts. #foo.rb
module Foo
module Bar
def biz
return 10
end
end
end
# main.rb
require './foo'
include Foo::Bar
biz() # => 10
> don't even bother installing it with a Linux package manager -- you're almost guaranteed to end up with the "wrong version" of ruby and rubygemsBecause that's not the case for Python or PHP on linux too? I bet it is,and it has nothing to do with the language itself. > If market use were the main concern you could probably argue for Java or C# The course isn't for CS undergrads. Your opinion but some points aren't fair at all. |
The compiler helped a lot. It's also a lot more consistent. When I started Ruby, I often didn't understand why something I wrote worked. That's not a feeling I got very often from c#.
That's just my experience. But I'd suggest c# is probably a better beginner's language. Especially paired with VS and an outstanding OOB debugging experience far superior and more approachable to anything I've ever seen in Ruby.