On Mon, May 14, 2012 at 01:51:11PM +0100, David Cantrell wrote:
> On Mon, May 14, 2012 at 11:13:05AM +0200, Abigail wrote:
> 
> > * Let's make where to count from a switch -- globally
> >   * Perl (till it got removed from the language)
> 
> Nope.  From the manpage:
> 
> " As of release 5 of Perl, assignment to $[ is treated as a compiler
>   directive, and cannot influence the behavior of any other file. "
> 
> So it was at least made a bit less stupid many years before being
> finally killed off.

Of course, you're correct. Which probably meant that for the handful of 
people that actually used $[, upgrading their Perl broke their programs
in mysterious ways.

> For extra excitement, perl has this nifty feature where you can index
> from the end of an array using negative numbers:
> 
>   @array = ('ant', 'bat', 'camel', 'dolphin');
>   print $array[-1]; # dolphin
>   print $array[-2]; # camel
> 
> I leave it as an exercise for the reader to figure out what the hell
> should happen if $[ is set to -2.

Luckely, tieing $[ doesn't work, and I don't think it ever did.

> > > * Let's compare case-insensitively by default
> > >   * Powershell, MySQL
> > * But be not consistent about this default
> >   * MySQL
> 
> viml:
> 
> " String comparisons normally honor the local setting of Vim's
>   ignorecase option, but any string comparator can also be explicitly
>   marked as case-sensitive (by appending a #) or case-insensitive (by
>   appending a ?) "


I was more thinking of:

  mysql> create table foo (bar int);
  Query OK, 0 rows affected (0.08 sec)

  mysql> insert into foo (BAR) values (1);
  Query OK, 1 row affected (0.00 sec)

  mysql> insert into FOO (bar) values (2);
  ERROR 1146 (42S02): Table 'xxx.FOO' doesn't exist
  mysql> 


Case insensitive column names, case sensitive table names (and IIRC, if you
use MyISAM tables on a case insensitive file system, your table names are 
case insensitive as well, which makes for fun upgrade paths....)

Although it wouldn't surprise me if MySQL used a configuration option that
turns on case insensitive table names. Probably one that can be configured
both on the client and server side. (But if it doesn't, I didn't write the
paragraph above; I don't want to put any "good" ideas into anyones head).


Abigail

Reply via email to