Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 1:58 AM, Michael G Schwern schw...@pobox.com wrote: The only other instance I can think of is... damn I can't remember the name. It's the one that makes URLs like /foo/bar/123,3598,235.html.  You write in Java and everything, even the templates, is stored in Oracle.

Re: Stupid Language Designer Tricks

2012-05-14 Thread Josh Juran
On May 14, 2012, at 12:00 AM, Aristotle Pagaltzis wrote: * Peter da Silva pe...@taronga.com [2012-05-14 02:45]: * Imagining that there's some relationship between computer languages and human languages. * See COBOL * See Perl * Imagining that there's no relationship between computer

Re: Stupid Language Designer Tricks

2012-05-14 Thread Aristotle Pagaltzis
* Peter da Silva pe...@taronga.com [2012-05-14 02:45]: * Imagining that there's some relationship between computer languages and human languages. * See COBOL * See Perl * Imagining that there's no relationship between computer languages and linguistic cognition. * Mathematical

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 9:00 AM, Aristotle Pagaltzis pagalt...@gmx.de wrote: * Mathematical notation is ideal for programming! See also: the thousands of new programmers confused by x = 5; not meaning x is equal to 5, despite what they had learned in maths class. (I'm reminded of a BASIC

Re: Stupid Language Designer Tricks

2012-05-14 Thread Michael G Schwern
On 2012.5.13 11:06 PM, Philip Newton wrote: On Mon, May 14, 2012 at 1:58 AM, Michael G Schwern schw...@pobox.com wrote: The only other instance I can think of is... damn I can't remember the name. It's the one that makes URLs like /foo/bar/123,3598,235.html. You write in Java and everything,

Re: Stupid Language Designer Tricks

2012-05-14 Thread Michael G Schwern
On 2012.5.13 11:18 PM, Numien wrote: On 13/05/12 07:58 PM, Michael G Schwern wrote: I can forgive Javascript of that because it has no file operations by (good) design and thus no way to load other files. Sure it does. See XMLHttpRequest the new HTML5 web storage, app cache, and socket

Re: Stupid Language Designer Tricks

2012-05-14 Thread Peter da Silva
On 2012-05-14, at 02:00, Aristotle Pagaltzis wrote: * Peter da Silva pe...@taronga.com [2012-05-14 02:45]: * Imagining that there's some relationship between computer languages and human languages. * See COBOL * See Perl * Imagining that there's no relationship between computer languages

Re: Stupid Language Designer Tricks

2012-05-14 Thread Tony Finch
Peter da Silva pe...@taronga.com wrote: * Imagining that there's some relationship between computer languages and human languages. * See COBOL * See Perl See AppleScript. Here's an epic rant on the subject: http://daringfireball.net/2005/09/english-likeness_monster Tony. --

Re: Stupid Language Designer Tricks

2012-05-14 Thread Peter Corlett
On Sun, May 13, 2012 at 07:35:39PM -0500, Peter da Silva wrote: [...] Like *x for indirection. Even Dennis agrees that was a mistake. He said that by the time he noticed it there were three sites using C so they thought it was probably too late to fix it. I heard the there were three sites

Re: Stupid Language Designer Tricks

2012-05-14 Thread Tony Finch
Andy Armstrong a...@hexten.net wrote: On 13 May 2012, at 18:48, Michael G Schwern wrote: * Lists count from 0 * Everybody does it * Everybody's wrong * See also let's just paste what C does I find it very hard to live with Lua's 1-based arrays. I don't think it's just familiarity -

Re: Stupid Language Designer Tricks

2012-05-14 Thread Peter da Silva
On 2012-05-14, at 05:03, Peter Corlett wrote: On Sun, May 13, 2012 at 07:35:39PM -0500, Peter da Silva wrote: [...] Like *x for indirection. Even Dennis agrees that was a mistake. He said that by the time he noticed it there were three sites using C so they thought it was probably too late to

Re: Stupid Language Designer Tricks

2012-05-14 Thread Abigail
On Mon, May 14, 2012 at 10:54:39AM +0100, Tony Finch wrote: Andy Armstrong a...@hexten.net wrote: On 13 May 2012, at 18:48, Michael G Schwern wrote: * Lists count from 0 * Everybody does it * Everybody's wrong * See also let's just paste what C does I find it very hard to

Re: Stupid Language Designer Tricks

2012-05-14 Thread demerphq
On 14 May 2012 02:17, Michael G Schwern schw...@pobox.com wrote: So much hate for tying the iterator to the data and not the op. Indeed. I see this bite people regularly at $work (non Perl programmers converting seem to get bitten by each() at least once in their career). In the case of hashes

Re: Stupid Language Designer Tricks

2012-05-14 Thread Numien
OOn 14/05/12 04:03 AM, Michael G Schwern wrote: AFAIK none of that is part of the Javascript language (ie. the ECMAscript). They're all special objects with their own standards and require special implementations. I don't believe you can write them in Javascript. And it's all fairly recent

Re: Stupid Language Designer Tricks

2012-05-14 Thread Peter Corlett
On Mon, May 14, 2012 at 11:06:59AM +0200, demerphq wrote: [...] I kinda wish perl had an interface like my $iter= iterator(%hash); while (my ($key,$value)= $iter-each) { } Which I think would be sane. You could even pass the iterator without passing the hash itself. (Preventing

Re: Stupid Language Designer Tricks

2012-05-14 Thread Aaron Crane
Peter Corlett ab...@cabal.org.uk wrote: I'd like to throw in the fun breakage caused by the combination of adding two unnecessary bits of syntactic sugar to Perl. Somebody decided that auto-deref would be nice, so you can do each $hashref and pop $arrayref. And then somebody else clearly

Re: Stupid Language Designer Tricks

2012-05-14 Thread Aaron Crane
Michael G Schwern schw...@pobox.com wrote: On 2012.5.13 11:36 AM, Peter Corlett wrote: I'd like to throw in the fun breakage caused by the combination of adding two unnecessary bits of syntactic sugar to Perl. Somebody decided that auto-deref would be nice, so you can do each $hashref and pop

Re: Stupid Language Designer Tricks

2012-05-14 Thread Tony Finch
Walt Mankowski waltman-hates-softw...@mawode.com wrote: * Everything is a string. * Tcl I like the term stringly typed. Tony. -- f.anthony.n.finch d...@dotat.at http://dotat.at/ Shannon: Northwest 5 to 7, perhaps gale 8 later. Rough or very rough. Showers. Good, occasionally moderate.

Re: Stupid Language Designer Tricks

2012-05-14 Thread Abigail
On Sun, May 13, 2012 at 10:48:13AM -0700, Michael G Schwern wrote: * Auto declare undeclared variables * PHP, Ruby * Typo protection out the window * Perl (unless you enable 'use strict vars', and don't fully qualify your vars; no such protection possible on subs if you use

Re: Stupid Language Designer Tricks

2012-05-14 Thread H.Merijn Brand
On Sun, 13 May 2012 10:48:13 -0700, Michael G Schwern schw...@pobox.com wrote: * A typed language with no way to define new types * SQL * Follow the standard only optionally All SQL dialects allow spaces as the SQL standard sais SELECT bar, count (*) FROM frublt GROUP BY bar;

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 11:47 AM, H.Merijn Brand h.m.br...@xs4all.nl wrote:  * Oracle converts to NULL on varchar2 fields Oh goodness yes. Whoever thought that was a good idea? And built such an SQL incompatibility into a major database engine? Cheers, Philip -- Philip Newton

Re: Stupid Language Designer Tricks

2012-05-14 Thread H.Merijn Brand
On Sun, 13 May 2012 10:48:13 -0700, Michael G Schwern schw...@pobox.com wrote: * Significant whitespace * Python * Oh god why Kurila * YAML does it right * So does Ruby One more (besides what I wrote about MySQL) C-preprocessor. The only compiler I know of that does it wrong

Re: Stupid Language Designer Tricks

2012-05-14 Thread Tony Finch
Michael G Schwern schw...@pobox.com wrote: * No namespaces * Lua, Javascript Lua does have namespaces, by changing which table is used for globals. There are amusing incompatibilities in this area between 5.1 and 5.2 ... Tony. -- f.anthony.n.finch d...@dotat.at http://dotat.at/ Fisher,

Re: Stupid Language Designer Tricks

2012-05-14 Thread Aristotle Pagaltzis
* Peter Corlett ab...@cabal.org.uk [2012-05-14 12:20]: On Mon, May 14, 2012 at 11:06:59AM +0200, demerphq wrote: I kinda wish perl had an interface like my $iter= iterator(%hash); while (my ($key,$value)= $iter-each) { } Which I think would be sane. You could even pass the iterator

Re: Stupid Language Designer Tricks

2012-05-14 Thread David Cantrell
On Mon, May 14, 2012 at 08:06:28AM +0200, Philip Newton wrote: On Mon, May 14, 2012 at 1:58 AM, Michael G Schwern schw...@pobox.com wrote: The only other instance I can think of is... damn I can't remember the name. It's the one that makes URLs like /foo/bar/123,3598,235.html.  You write in

Re: Stupid Language Designer Tricks

2012-05-14 Thread Roger Burton West
On Mon, May 14, 2012 at 01:28:45PM +0100, David Cantrell wrote: Storyserver was supposed to be a content management system, but when I used it it couldn't handle binary file uploads - so you couldn't use it to upload images. Their solution to this was to send us some C source which was untested,

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 2:28 PM, David Cantrell da...@cantrell.org.uk wrote: On Mon, May 14, 2012 at 08:06:28AM +0200, Philip Newton wrote: Vignette StoryServer? I had a bit of a go with that... back when the language was Tcl, not Java. Fun times. Especially counting the backslashes. Do we need

Re: Stupid Language Designer Tricks

2012-05-14 Thread David Cantrell
On Mon, May 14, 2012 at 03:01:05PM +0200, Philip Newton wrote: because we don't have a compiler in the UK. That makes me wonder whether UK refers to the Ukraine in this context What an extremely odd thing for a company to say. What our client said was odder. They said we want you to use

Re: Stupid Language Designer Tricks

2012-05-14 Thread David Cantrell
On Sun, May 13, 2012 at 04:58:49PM -0700, Michael G Schwern wrote: On 2012.5.13 3:41 PM, David Cantrell wrote: Perl used to have this. It was called #include. It's a damned shame that -P got killed off. Removing it was hateful. Let's run one language through another language's

Re: Stupid Language Designer Tricks

2012-05-14 Thread demerphq
On 14 May 2012 14:34, David Cantrell da...@cantrell.org.uk wrote: On Sun, May 13, 2012 at 04:58:49PM -0700, Michael G Schwern wrote: On 2012.5.13 3:41 PM, David Cantrell wrote: Perl used to have this.  It was called #include.  It's a damned shame that -P got killed off.  Removing it was

Re: Stupid Language Designer Tricks

2012-05-14 Thread Peter da Silva
On 2012-05-14, at 06:07, Aaron Crane wrote: Since these two enhancements aren't entirely compatible, the current situation is unfortunate: a +-prototyped argument must be an unblessed array or hash ref — not a blessed reference, and not an autovivifying undef (so `push $x, list` doesn't work on

Re: Stupid Language Designer Tricks

2012-05-14 Thread Peter Corlett
On Mon, May 14, 2012 at 11:20:37AM -0400, Sean Conner wrote: [...] Are you kidding? It can get much worse than that. I came across a language [1] that allows for patterm matched random GOSUBs (and that's the general case---it can do GOSUBs like other langauges, but it can also do random

Re: Stupid Language Designer Tricks

2012-05-14 Thread David Cantrell
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

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 2:51 PM, David Cantrell da...@cantrell.org.uk wrote: 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]; #

Re: Stupid Language Designer Tricks

2012-05-14 Thread Abigail
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

Re: Stupid Language Designer Tricks

2012-05-14 Thread Robert Rothenberg
Well, while we're ranting about stupid language design desisions... I would like to dish out a special platter of hate for Puppet. Well, not a programming language per se. But Puppet is special in that it's intended to be a *descriptive* language. So you describe how your servers are to be