Re: Magic features of programming languages

2011-05-23 Thread Richard O'Keefe
On 22/05/2011, at 11:17 PM, Frank Wales wrote: Blimey, are we top-posting or bottom-posting in this discussion? Anyway... The original question was about whether there were studies on the effect of 'magic' features, but we seem to have devolved into a show-and-tell of them instead. I

Re: Magic features of programming languages

2011-05-22 Thread Lindsay Marshall
PDP-8 had auto-increment locations down in low memory in similar style. I suppose the device addressing through memory on lots of machines counts as magic too, L. Sent from my iPad On 22 May 2011, at 06:39, Thomas Green green...@ntlworld.com wrote: Kevlin Henney wrote: To really

Re: Magic features of programming languages

2011-05-22 Thread Frank Wales
Blimey, are we top-posting or bottom-posting in this discussion? Anyway... The original question was about whether there were studies on the effect of 'magic' features, but we seem to have devolved into a show-and-tell of them instead. I wonder whether one person's 'magic' is another person's

Re: Magic features of programming languages

2011-05-21 Thread Frank Wales
Kevlin Henney wrote: To really demonstrate autoboxing you need to allow the compiler to convert from int to Integer: Integer x = 1000; Integer y = 1000; However, if you are after interesting counterintuitive corner cases, change the constant to 100: Integer x = 100; Integer

Re: Magic features of programming languages

2011-05-21 Thread Peter Gutmann
Kevlin Henney kev...@curbralan.com writes: In other words, your corner case has a corner case. And they let children play with this stuff? Peter. -- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England Wales and a charity registered in Scotland

Re: Magic features of programming languages

2011-05-21 Thread Thomas Green
Kevlin Henney wrote: To really demonstrate autoboxing you need to allow the compiler to convert from int to Integer: Integer x = 1000; Integer y = 1000; However, if you are after interesting counterintuitive corner cases, change the constant to 100: Integer x = 100; Integer y =

Magic features of programming languages

2011-05-20 Thread Martin C.Martin
Hi all, When a construct is ambiguous, sometimes language designers will provide a default which (they hope) does the right thing in the common case. An example is XPath. When = is called on two sets, the semantics are that there is at least one pair of elements (one from each set) that

Re: Magic features of programming languages

2011-05-20 Thread Martin C.Martin
Best, Martin Original Message Subject:Re: Magic features of programming languages Date: Fri, 20 May 2011 12:31:53 -0400 From: John Daughtry j...@daughtryhome.com To: Martin C.Martin mar...@martincmartin.com I don't have a reference, but a more general example