From: Matthew Kerwin Date: 2013-02-08T06:15:19+09:00 Subject: [ruby-core:52006] Re: [ruby-trunk - Feature #7792] Make symbols and strings the same thing --f46d042f95be3d5ffa04d528d4ab Content-Type: text/plain; charset=ISO-8859-1 On 8 February 2013 03:01, jeremyevans0 (Jeremy Evans) < merch-redmine@jeremyevans.net> wrote: > > phluid61 (Matthew Kerwin) wrote: > > > Take the Sequel library for instance. > > > > No thanks, apparently the authors don't know the difference between > Symbols > > and Strings. > > Sequel uses symbol keys instead of string keys intentionally. Sequel maps > SQL features directly to ruby objects, mapping SQL identifiers > (columns/tables/aliases) to ruby symbols and SQL strings to ruby strings. > SQL query results can be thought of as a mapping of SQL identifiers to the > values for each identifier in the query, thus Sequel uses a hash with > symbol keys. Sorry, I was being glib. Interestingly, this is actually an example of Symbols being used correctly (or at least, not just out-right incorrectly). It's a pity people see this is a problem to be worked around, rather than a feature. --f46d042f95be3d5ffa04d528d4ab Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 8= February 2013 03:01, jeremyevans0 (Jeremy Evans) <merch-redmi= ne@jeremyevans.net> wrote:

phluid61 (Matthew Kerwin) wrote:
> =A0> Take the Sequel library for instance.
>
> =A0No thanks, apparently the authors don't know the difference bet= ween Symbols
> =A0and Strings.

Sequel uses symbol keys instead of string keys intentionally. =A0Sequ= el maps SQL features directly to ruby objects, mapping SQL identifiers (col= umns/tables/aliases) to ruby symbols and SQL strings to ruby strings. SQL q= uery results can be thought of as a mapping of SQL identifiers to the value= s for each identifier in the query, thus Sequel uses a hash with symbol key= s.

Sorry, I was being glib.

Interestingl= y, this is actually an example of Symbols being used correctly (or at least= , not just out-right incorrectly).=A0 It's a pity people see this is a = problem to be worked around, rather than a feature.
--f46d042f95be3d5ffa04d528d4ab--