Re: Stupid Language Designer Tricks

2012-06-14 Thread David Parsons
On Jun 14, 2012, at 3:39 AM, Peter da Silva wrote: > On 2012-06-13, at 10:41, David Cantrell wrote: >> My first impressions of Go are good, but that means it's off-topic. > > It looks way too high level to replace 'C'. > > Oh, sorry, I mean "optional semicolons? rant rant!" What could be bette

Re: Stupid Language Designer Tricks

2012-06-14 Thread Peter da Silva
On 2012-06-13, at 10:41, David Cantrell wrote: > On Wed, Jun 13, 2012 at 06:55:31AM -0500, Peter da Silva wrote: >> On 2012-06-11, at 13:08, Aaron J. Grier wrote: >>> On Sat, May 19, 2012 at 03:49:15PM -0500, Peter da Silva wrote: On 2012-05-19, at 11:43, Michael G Schwern wrote: > Or st

Re: Stupid Language Designer Tricks

2012-06-13 Thread David Cantrell
On Wed, Jun 13, 2012 at 06:55:31AM -0500, Peter da Silva wrote: > On 2012-06-11, at 13:08, Aaron J. Grier wrote: > > On Sat, May 19, 2012 at 03:49:15PM -0500, Peter da Silva wrote: > >> On 2012-05-19, at 11:43, Michael G Schwern wrote: > >>> Or still using it, basically unchanged, as our primary sy

Re: Stupid Language Designer Tricks

2012-06-13 Thread Peter da Silva
On 2012-06-11, at 13:08, Aaron J. Grier wrote: > On Sat, May 19, 2012 at 03:49:15PM -0500, Peter da Silva wrote: >> On 2012-05-19, at 11:43, Michael G Schwern wrote: >>> Or still using it, basically unchanged, as our primary system >>> programming language in 2012. >> Yeh, it really sucks that in

Re: Stupid Language Designer Tricks

2012-06-11 Thread Aaron J. Grier
On Sat, May 19, 2012 at 03:49:15PM -0500, Peter da Silva wrote: > On 2012-05-19, at 11:43, Michael G Schwern wrote: > > Or still using it, basically unchanged, as our primary system > > programming language in 2012. > > Yeh, it really sucks that in 50 years nobody has ever been able to > develop a

Re: Stupid Language Designer Tricks

2012-05-23 Thread Robert Rothenberg
On 14/05/12 17:28 Luke Kanies wrote: On May 14, 2012, at 9:06 AM, Robert Rothenberg wrote: [Snip!] But Puppet is special in that it's intended to be a *descriptive* language. So you describe how your servers are to be configured. Sounds nice, except... it has side effects. Which makes the

Re: Stupid Language Designer Tricks

2012-05-22 Thread Tony Finch
Michael G Schwern wrote: > > The third is distraction. For some reason every language which started out to > replace C gets distracted by dreams of being an application language. I'm > thinking Java (was originally supposed to run on set top boxes), Objective-C > and C++ It is particularly curi

Re: Stupid Language Designer Tricks

2012-05-21 Thread Peter da Silva
On 2012-05-21, at 16:22, Michael G Schwern wrote: The first is "the enemy of the best is good enough" and C was good enough... for a time. It solved a problem (portable machine programming) better and faster than its contemporaries and even much later languages. Not just "good enough", I used

Re: Stupid Language Designer Tricks

2012-05-21 Thread David Parsons
On May 21, 2012, at 2:22 PM, Michael G Schwern wrote: This is a personal observation, folks to code C like details of bits and registers and hardware details and such. Novices like to prattle on about C being just another assembly language, but they don't know what they're talking about.

Re: Stupid Language Designer Tricks

2012-05-21 Thread Roger Burton West
On Mon, May 21, 2012 at 02:53:52PM -0700, David Parsons wrote: >Novices like to prattle on about C being just another assembly >language, but they don't know what they're talking about. No, C-- was just another assembly language. Actually it was a slightly C-like wrapper language that expected

Re: Stupid Language Designer Tricks

2012-05-21 Thread Michael G Schwern
On 2012.5.20 4:40 AM, Peter da Silva wrote: > Smalltalk was also not low level enough to be used as an alternative to C. > It wouldn't even fit in the PDP-11 they started with. Never claimed it was. >> The list was done evaluating C as a language we use and are heavily >> influenced >> by in 20

Re: Stupid Language Designer Tricks

2012-05-21 Thread Tony Finch
Peter da Silva wrote: > > I'll give you the fall-through in case. There are some other things that were fixed in later versions: Single namespace for structure and union members No function argument type checking There are some things that haven't been fixed: const Operators (particularly * &

Re: Stupid Language Designer Tricks

2012-05-20 Thread Peter da Silva
On 2012-05-19, at 16:54, Michael G Schwern wrote: Smalltalk was in production in 72 making it a contemporary with C. Smalltalk 80 was the first released version, roughly coinciding with the K&R book. And Simula had all the trappings of a modern OO language (and a lot most still don't have) in 1

Re: Stupid Language Designer Tricks

2012-05-20 Thread demerphq
On 18 May 2012 22:07, Michael G Schwern wrote: > switch fall through. (still a classic mistake). I guess you mean defaulting to falling through? Yeah that probably should have defaulted to the other way, even though C's approach matches what actually happens. On the other hand i seem to remember

Re: Stupid Language Designer Tricks

2012-05-19 Thread Aristotle Pagaltzis
* Greg McCarroll [2012-05-19 23:00]: > Lisp machines[1] didn't exactly take off. C++/STL didn't have anyone > build upon it for other languages significantly (i'm sure i'm about to > be proven wrong here) , just for sheer mischief i'll mention Topaz[2]. Bagging on C as a language is like bagging

Re: Stupid Language Designer Tricks

2012-05-19 Thread Michael G Schwern
On 2012.5.19 1:46 PM, Peter da Silva wrote: > Smalltalk came out ten years later. Smalltalk was in production in 72 making it a contemporary with C. Smalltalk 80 was the first released version, roughly coinciding with the K&R book. And Simula had all the trappings of a modern OO language (and a

Re: Stupid Language Designer Tricks

2012-05-19 Thread Michael G Schwern
On 2012.5.15 1:41 PM, Jarkko Hietaniemi wrote: >> Otherwise I haven't come across this problem in other major languages... >> except maybe C. And original C has so many design flaws that the list would >> become useless. > > You will have to back that up somehow, laddie. And get offa my lawn. I

Re: Stupid Language Designer Tricks

2012-05-19 Thread Peter da Silva
On 2012-05-18, at 15:07, Michael G Schwern wrote: Bagging on C is like bagging on Shakespeare. They were severely limited in hardware, didn't have a whole lot of prior art to go on and not a whole lot of people to talk to about it. Smalltalk, ML, Pascal, Prolog, Lisp and SQL all came out about

Re: Stupid Language Designer Tricks

2012-05-19 Thread Peter da Silva
On 2012-05-19, at 11:43, Michael G Schwern wrote: Or still using it, basically unchanged, as our primary system programming language in 2012. Yeh, it really sucks that in 50 years nobody has ever been able to develop a genuinely better alternative.

Re: Stupid Language Designer Tricks

2012-05-19 Thread Aristotle Pagaltzis
* Michael G Schwern [2012-05-19 18:50]: > Or still using it, basically unchanged, as our primary system > programming language in 2012. Indeed: why oh why… One has to wonder.

Re: Stupid Language Designer Tricks

2012-05-19 Thread Greg McCarroll
On 19 May 2012, at 21:38, Aristotle Pagaltzis wrote: * Michael G Schwern [2012-05-19 18:50]: Or still using it, basically unchanged, as our primary system programming language in 2012. Indeed: why oh why… One has to wonder. Just to play the devil sitting on the devil's advocates shoulde

Re: Stupid Language Designer Tricks

2012-05-19 Thread Michael G Schwern
On 2012.5.18 2:18 PM, Jarkko Hietaniemi wrote: > [ a long list snipped] > > Now, tell us how you *really* feel about C? http://schwern.net/img/Hate%20dog.jpg > In case you didn't guess it yet, I was playing advocatus diaboli in > reverse here. (In modernese: trolling.) In other words, your li

Re: Stupid Language Designer Tricks

2012-05-18 Thread Michael G Schwern
On 2012.5.14 9:38 AM, demerphq wrote: > On 14 May 2012 14:34, David Cantrell wrote: >> I wouldn't mind if it was disabled by default and if I had to explicitly >> enable it per file, with something like 'no strict cpp'. > > Couldnt this just be a filter/preprocessor thingee? Filter::cpp has exis

Re: Stupid Language Designer Tricks

2012-05-18 Thread Michael G Schwern
On 2012.5.15 1:41 PM, Jarkko Hietaniemi wrote: >> Otherwise I haven't come across this problem in other major languages... >> except maybe C. And original C has so many design flaws that the list would >> become useless. > > You will have to back that up somehow, laddie. And get offa my lawn. >

Re: Stupid Language Designer Tricks

2012-05-18 Thread Jarkko Hietaniemi
> And since you asked, off the top of my head... > [ a long list snipped] Now, tell us how you *really* feel about C? In case you didn't guess it yet, I was playing advocatus diaboli in reverse here. (In modernese: trolling.) In other words, your list and argument was good, though many items we

Re: Stupid Language Designer Tricks

2012-05-16 Thread Peter Corlett
On Wed, May 16, 2012 at 10:22:55AM -0700, Robert G. Werner wrote: > On 05/16/2012 03:22 AM, Peter Corlett wrote: [...] >> I'd like to see somebody try and write an operating system kernel in Perl >> :) > I'm sure it could be written, ... once There is the Perlix userspace: http://collaboration.cm

Re: Stupid Language Designer Tricks

2012-05-16 Thread Robert G. Werner
On 05/16/2012 03:22 AM, Peter Corlett wrote: On Tue, May 15, 2012 at 01:41:09PM -0700, Jarkko Hietaniemi wrote: [...] Otherwise I haven't come across this problem in other major languages... except maybe C. And original C has so many design flaws that the list would become useless. You will hav

Re: Stupid Language Designer Tricks

2012-05-16 Thread Peter da Silva
On 2012-05-15, at 15:39, Michael G Schwern wrote: I've heard that same story but about the hard tab in make. Smells like an urban legend... or proof that programmers care too much about backwards compatibility. Well, he really did say there were N sites using it, and N was small. But it was

Re: Stupid Language Designer Tricks

2012-05-16 Thread Peter Corlett
On Tue, May 15, 2012 at 01:41:09PM -0700, Jarkko Hietaniemi wrote: [...] >> Otherwise I haven't come across this problem in other major languages... >> except maybe C. And original C has so many design flaws that the list >> would become useless. > You will have to back that up somehow, laddie. And

Re: Stupid Language Designer Tricks

2012-05-15 Thread Michael G Schwern
On 2012.5.14 2:47 AM, H.Merijn Brand wrote: > * undef/NULL handling > > * Oracle converts "" to NULL on varchar2 fields > * MySQL considers the date -00-00 both NULL and NOT NULL at > the same time I would boil that down to "trinary logic". A good idea that NOBODY gets it right. If

Re: Stupid Language Designer Tricks

2012-05-15 Thread Michael G Schwern
On 2012.5.14 2:06 AM, demerphq wrote: > On 14 May 2012 02:17, Michael G Schwern 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

Re: Stupid Language Designer Tricks

2012-05-15 Thread Michael G Schwern
On 2012.5.14 5:08 AM, Aristotle Pagaltzis wrote: > * Peter Corlett [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

Re: Stupid Language Designer Tricks

2012-05-15 Thread Michael G Schwern
On 2012.5.14 3:17 AM, Peter da Silva wrote: > 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 s

Re: Stupid Language Designer Tricks

2012-05-15 Thread Jarkko Hietaniemi
Otherwise I haven't come across this problem in other major languages... except maybe C.  And original C has so many design flaws that the list would become useless. You will have to back that up somehow, laddie. And get offa my lawn. (I can somewhat understand if your basic premise is simply

Re: Stupid Language Designer Tricks

2012-05-15 Thread Michael G Schwern
On 2012.5.14 2:44 AM, Numien wrote: > But, that is another good point: > * We'll add file access and persistent storage later Still don't count that as a design mistake in Javascript, but a design feature. It was designed as a secure language and that means very, very restricted I/O and storage.

Re: Stupid Language Designer Tricks

2012-05-15 Thread demerphq
On 15 May 2012 12:22, Peter da Silva wrote: On 2012-05-14, at 10:58, H.Merijn Brand wrote: Reminds me of an April-fools article introducing "COME FROM" to the language to ease debugging. In the end of that article they also described "COME FROM ON ...". Hilarious http://en.wikipedia.org/wiki/

Re: Stupid Language Designer Tricks

2012-05-15 Thread Tony Finch
Darrell Fuhriman wrote: > > I'm personally of the opinion that they should abandon the custom DSL in > favor of a pure ruby implementation, but I seem to be on the losing end > of that argument. This is one of the weirder design decisions of Puppet, given how fashionable embedded DSLs are in the

Re: Stupid Language Designer Tricks

2012-05-15 Thread Darrell Fuhriman
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 conf

Re: Stupid Language Designer Tricks

2012-05-15 Thread David Cantrell
On Tue, May 15, 2012 at 05:15:56AM -0500, Peter da Silva wrote: > On 2012-05-14, at 07:51, David Cantrell 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'); > > prin

Re: Stupid Language Designer Tricks

2012-05-15 Thread Peter da Silva
On 2012-05-14, at 07:51, David Cantrell 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]; # camel That really _is_ a nifty f

Re: Stupid Language Designer Tricks

2012-05-15 Thread Peter da Silva
On 2012-05-14, at 10:58, H.Merijn Brand wrote: > Reminds me of an April-fools article introducing "COME FROM" to the > language to ease debugging. In the end of that article they also > described "COME FROM ON ...". Hilarious > > http://en.wikipedia.org/wiki/COMEFROM > http://www.fortran.com/come

Re: Stupid Language Designer Tricks

2012-05-14 Thread Luke Kanies
On May 14, 2012, at 9:06 AM, Robert Rothenberg wrote: Well, while we're ranting about stupid language design desisions... I would like to dish out a special platter of hate for Puppet. I know this is a hate mailing list, not a "defend your baby" list, but this particular hate is kinda my fa

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 conf

Re: Stupid Language Designer Tricks

2012-05-14 Thread Phil! Gold
* Abigail [2012-05-14 16:34 +0200]: > Although it wouldn't surprise me if MySQL used a configuration option that > turns on case insensitive table names. I'm fairly certain it does. I recall having to turn on something like that when we were evaluating some software whose developer apparently wo

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,

Re: Stupid Language Designer Tricks

2012-05-14 Thread Paul Johnson
On Mon, May 14, 2012 at 04:34:28PM +0200, Abigail wrote: > 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 langu

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 2:51 PM, David Cantrell 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]; # camel I leave it as an e

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 Sean Conner
It was thus said that the Great Peter Corlett once stated: > 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---i

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 > GOS

Re: Stupid Language Designer Tricks

2012-05-14 Thread H.Merijn Brand
On Mon, 14 May 2012 11:20:37 -0400, Sean Conner wrote: > It was thus said that the Great Peter Corlett once stated: > > On Sun, May 13, 2012 at 10:48:13AM -0700, Michael G Schwern wrote: > > > > > > * Use the same function for two totally different things. > > > * eval BLOCK; eval STRING > > >

Re: Stupid Language Designer Tricks

2012-05-14 Thread Sean Conner
It was thus said that the Great Peter Corlett once stated: > On Sun, May 13, 2012 at 10:48:13AM -0700, Michael G Schwern wrote: > > > > * Use the same function for two totally different things. > > * eval BLOCK; eval STRING > > * select FILEHANDLE; select BITS, BITS, BITS, TIMEOUT > > Don't fo

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 demerphq
On 14 May 2012 14:34, David Cantrell 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 hateful. Let's run one la

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 prepro

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 "unt

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 2:28 PM, David Cantrell 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 four here? Five? Seve

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

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 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 e

Re: Stupid Language Designer Tricks

2012-05-14 Thread Aristotle Pagaltzis
* Peter Corlett [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 > > without

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 11:47 AM, H.Merijn Brand 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 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 allways is the very

Re: Stupid Language Designer Tricks

2012-05-14 Thread Tony Finch
Michael G Schwern 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.finchhttp://dotat.at/ Fisher, German Bight: Southwest 4 or 5

Re: Stupid Language Designer Tricks

2012-05-14 Thread Aaron Crane
Michael G Schwern 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 $arrayref". And

Re: Stupid Language Designer Tricks

2012-05-14 Thread Tony Finch
Walt Mankowski wrote: > > * Everything is a string. > * Tcl I like the term "stringly typed". Tony. -- f.anthony.n.finchhttp://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 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 Aaron Crane
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 $arrayref". > And then somebody else clearly huffed a bit too

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 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 t

Re: Stupid Language Designer Tricks

2012-05-14 Thread demerphq
On 14 May 2012 02:17, Michael G Schwern 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 I think tying it

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 hist

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 modific

Re: Stupid Language Designer Tricks

2012-05-14 Thread Tony Finch
Andy Armstrong 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 - lo

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 t

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 si

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 [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 c

Re: Stupid Language Designer Tricks

2012-05-14 Thread Tony Finch
Peter da Silva 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. -- f.anthony.n.finchh

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 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 te

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 > socke

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 9:00 AM, Aristotle Pagaltzis 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 dialect on our 64K

Re: Stupid Language Designer Tricks

2012-05-14 Thread Aristotle Pagaltzis
* Peter da Silva [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 notation is ideal for

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 [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 l

Re: Stupid Language Designer Tricks

2012-05-14 Thread Philip Newton
On Mon, May 14, 2012 at 1:58 AM, Michael G Schwern 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. Vignette StoryServer?

Re: Stupid Language Designer Tricks

2012-05-13 Thread Peter da Silva
, and it >> wasn't at all clear they'd ever be able to be implemented >> efficiently in something like C. > Yeah, I probably should have put a smiley after C. I was thinking > about the schism into C++ and ObjC, but we can't really blame Ritchie > for that.

Re: Stupid Language Designer Tricks

2012-05-13 Thread Josh Juran
On May 13, 2012, at 7:13 PM, Walt Mankowski wrote: On Sun, May 13, 2012 at 09:07:56PM -0500, Peter da Silva wrote: On 2012-05-13, at 20:55, Walt Mankowski wrote: * We'll add classes later. * C Classes were still a kind of experimental idea in 1970, and it wasn't at all clear they'd ever be

Re: Stupid Language Designer Tricks

2012-05-13 Thread Peter da Silva
On 2012-05-13, at 20:55, Walt Mankowski wrote: * We'll add classes later. * C Classes were still a kind of experimental idea in 1970, and it wasn't at all clear they'd ever be able to be implemented efficiently in something like C.

Re: Stupid Language Designer Tricks

2012-05-13 Thread Walt Mankowski
On Sun, May 13, 2012 at 09:07:56PM -0500, Peter da Silva wrote: > On 2012-05-13, at 20:55, Walt Mankowski wrote: > > * We'll add classes later. > > * C > > Classes were still a kind of experimental idea in 1970, and it > wasn't at all clear they'd ever be able to be implemented > efficiently in s

Re: Stupid Language Designer Tricks

2012-05-13 Thread Aristotle Pagaltzis
* Michael G Schwern [2012-05-13 19:50]: > * We'll add threads later. > * Perl * We'll add threads. ('Some people, when confronted with a problem, think, "I know, I'll use threads," and then two they hav erpoblesms.' ---Ned Batchelder) And a much worse one as far as Perl is concerned:

Re: Stupid Language Designer Tricks

2012-05-13 Thread Walt Mankowski
On Sun, May 13, 2012 at 10:48:13AM -0700, Michael G Schwern wrote: > * We'll add threads later. > * Perl * We'll add classes later. * C * Perl * Everything is a string. * Tcl

Re: Stupid Language Designer Tricks

2012-05-13 Thread Peter da Silva
On 2012-05-13, at 12:59, Andy Armstrong 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-13 Thread Peter da Silva
Ever since I’ve dealt with them in XPath I would add Humans start counting from 1 so the computer should too to whatever else would be on my list in the spirit of Schwern’s. Oh yes, add to the list of stupid language designer tricks: * Imagining that there's some relationship between co

Re: Stupid Language Designer Tricks

2012-05-13 Thread Michael G Schwern
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 $arrayref". > And then somebody else cl

Re: Stupid Language Designer Tricks

2012-05-13 Thread Aristotle Pagaltzis
* Andy Armstrong [2012-05-13 20:05]: > I find it very hard to live with Lua's 1-based arrays. I don't think > it's just familiarity - lots of index calculations work out > significantly more verbose and ugly with 1-based arrays. Ever since I’ve dealt with them in XPath I would add Humans sta

Re: Stupid Language Designer Tricks

2012-05-13 Thread Michael G Schwern
On 2012.5.13 3:41 PM, David Cantrell wrote: > On Sun, May 13, 2012 at 02:13:28PM -0400, Numien wrote: >> On 13/05/12 01:48 PM, Michael G Schwern wrote: >>> The rpmbuild post reminded me of my list of stupid language designer >>> tricks. >>> This is a file I

Re: Stupid Language Designer Tricks

2012-05-13 Thread David Cantrell
On Sun, May 13, 2012 at 02:13:28PM -0400, Numien wrote: > On 13/05/12 01:48 PM, Michael G Schwern wrote: > >The rpmbuild post reminded me of my list of stupid language designer > >tricks. > >This is a file I add to every time I read about some stupid mistake (or > &g

Re: Stupid Language Designer Tricks

2012-05-13 Thread Peter Corlett
On Sun, May 13, 2012 at 10:48:13AM -0700, Michael G Schwern wrote: [...] > * Lists count from 0 > * Everybody does it > * Everybody's wrong > * See also "let's just paste what C does" 0's good because it avoids fencepost errors. Perhaps you would prefer the Stan Kelly-Bootle compromise of 0.

Re: Stupid Language Designer Tricks

2012-05-13 Thread Numien
On 13/05/12 01:48 PM, Michael G Schwern wrote: The rpmbuild post reminded me of my list of stupid language designer tricks. This is a file I add to every time I read about some stupid mistake (or "brilliant" feature) in a language and think "if I ever write a language I am rememb

Re: Stupid Language Designer Tricks

2012-05-13 Thread Andy Armstrong
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 - lots of index calculations work out signifi

Stupid Language Designer Tricks

2012-05-13 Thread Michael G Schwern
The rpmbuild post reminded me of my list of stupid language designer tricks. This is a file I add to every time I read about some stupid mistake (or "brilliant" feature) in a language and think "if I ever write a language I am remembering not to do THAT!" But really I'