Hacker News new | ask | show | jobs
by yellowapple 3978 days ago
> It doesn't have first-level functions, instead it has blocks

Ruby also has lambdas, which if not first-level functions, are pretty darn close.

> It doesn't have namespaced imports, instead its imports effectively behave like includes (i.e. the "dump truck" approach to imports).

I can't tell if you're talking about `require` or `include`.

`require` is strictly meant for loading source files. If you want things to be restricted to a particular namespace, you should use `include` to pull in a particular module (once the module's code has been `require`d or otherwise `eval`d or defined).

> Ruby isn't widely used in practice

What? Ruby on Rails is ridiculously popular as a web framework.

> Installing it requires some amount of care and technical knowledge

On Macs and many GNU/Linux distros, Ruby is already preinstalled.

> 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 rubygems

Um, what? The only thing I can think of is a really old packaged Ruby. Otherwise, it's actually pretty hard to go wrong, in my experience having installed Ruby on pretty much every GNU/Linux distro known to man.

> but it would be nice if there were well-written books aimed at a more general audience.

O'Reilly and Pragmatic Programmers both publish a wide variety of excellent Ruby programming books that are very much "aimed at a more general audience".

> I'm not sure what the "best" first programming language is. JS has its merits

Oh good god no.

> and all you need to try it out is a modern web browser.

If that's what matters to you, then you can do the same with Ruby. Take a look at tryruby.org, for example.

1 comments

> What? Ruby on Rails is ridiculously popular as a web framework.

This is the typical HN bias. If you ask someone on HN what framework they think is most popular, they'll likely say Rails. But is this actually true?

In comparison to, say, Django or the various node frameworks, sure, it's popular. But in comparison to the "big guys" (the various frameworks for PHP, Java, C#) it barely registers.

> But in comparison to the "big guys" (the various frameworks for PHP, Java, C#) it barely registers.

[citation needed]

[citation needed] especially for C#; the only .NET-based language I know of that registers as even a blip in web development is, for better or worse, ASP.NET.

[citation needed] also for PHP frameworks; most PHP web "applications", in my experience, don't use any sort of "framework" at all, instead opting to use CGI with direct manipulation of HTML tags in order to do anything. Facebook is the only significant exception that I'm aware of.

> especially for C#; the only .NET-based language I know of that registers as even a blip in web development is, for better or worse, ASP.NET.

ASP.NET isn't a language, its a web framework for .NET; usually used with either C# or VB.NET.

In which case I stand corrected there (I was getting it confused with ASP/VBScript; I've tended to steer clear of either).
> This is the typical HN bias.

Go check on Reddit then ? :)