News for hackers. Stuff that matters.
Re:Ruby Stdlib is a Ghetto, Pt. 2 by djacobs on Thursday November 25, 2010 @09:46PM (#1941509)
I think part of the issue is that different people expect different functionality from a "standard library". I see three logical divisions within the language we call "Ruby":

1. Core language - Definition of language syntax and literals, regular expressions, core data structures

2. Standard library - Functionality that is expected out of a programming language (not framework) - things like file reading, ERb, etc.

3. Standard protocols - A set of libraries with the default Ruby implementations for standard protocols - HTTP, JSON, SSL, OpenId, etc.

It seems to me like protocols don't belong in the same directory as libraries for basic local file operations, but maybe that's just me.

Either way, I think the standard library, while not a ghetto, could use more order and care.

Re:Ruby Stdlib is a Ghetto, Pt. 2 by regularfry on Friday November 26, 2010 @11:18AM (#1942637)
> It seems to me like protocols don't belong in the same directory as libraries for basic local file operations

They aren't. File is in core, net/http is in stdlib. FileUtils is in stdlib, but that's more about interaction with the filesystem than files themselves, and it's not necessary for every single ruby script the way File is.

For the most part, I think the core/stdlib separation is ok. What I take issue with is the namespace organisation, especially in stdlib. I'd rather see a deeper hierarchy that avoids stomping on the top-level namespace than what we've got now, but that's a lot of work to reorganise.