Michael G Schwern wrote: > Binary and unary dot: > > This makes me *very* happy. This is probably the best thing I've > heard all day. > Seconded.
> I've been playing with Ruby, which has a similar feature. @foo is an > object instance variable. Inside a class definition, foo() is a > object method call on the current object. Outside it's a class method > call on the current class. Works out very nicely under the fingers. > I really hope that the unary . is required (as Larry suggested)--I don't want foo() to be a method call on the current object unless the '.' prefix is there. Also, I hope we see a with{} block that lets you specify the object to use as the implicit LHS of the unary dot. > Binary ; > > This worries me. Giving ; two meanings makes basic language parsing > harder, which would be fine if there was a big payoff, but there's > not. Just making shorthand for [[1,2,3],[4,5,6]] doesn't seem worth > it. What am I missing here? I'm not sure if you're missing anything or not. Have a look at RFC 205 which proposes an in-list role for ';', which is absolutely crucial to the whole package of array RFCs (202-207). I suspect Larry has something up his sleave here though (since his proposals often seem to make more sense in hindsight--kinda like Nostradamus, only not in quaterns), so perhaps we have to faith in the ineffable plan for the time being. > Lazy lists: > > Neat! It'll be hell to make them work right, but neat! Damian retracted RFC 024, which specified infinite lists, and I re-opened that when I started the lazy-list RFC 082 that Larry discusses. After numerous people insisted that infinite lists were impossible (a fact that I'm yet to be convinced of given that they exist in other languages) I removed the infinite list stuff from RFC 082 and just left in the nifty list comprehension syntax. Damian's advice to me at the time was that there's enough meat in RFC 082 without the infinite list stuff, so we'd be best off keeping the issues separate; in hindsight it was good advice. Without the infinite list requirement RFC 082 isn't "hell", although avoiding unnecessary calculation of intermediate elements will be a challenge (and failure to do this well just makes things slow, not broken). Anyway, Larry seems to have bought back elements of RFC 024 back into his discussion of RFC 082--but I think we should continue to keep the two proposals reasonably distinct as we consider their design and implementation. > Hyperoperators: > > I sort of understand it, but don't really grok it. I can sort of > thing of ways it might eliminate the need for a few maps and > foreaches. Damian, might I request some clarification in Exogenesis? > Err... I'm not Damian, but can I answer anyway? ;-) In general, array operations in languages that support them (most notably APL and J; also Haskell, Mathematica, and many more) almost entirely remove the need for loops. Mathematical notation is a good example of a language with rich array operations, allowing the manipulation of multi-dimensional arrays (except that mathematicians call them 'tensors' to sound impressive :-) using a clear and brief syntax. My favorite introduction to the joys of array-oriented languages is here: http://www.jsoftware.com/primer/main.htm To describe it as just eliminating 'the need for a few maps and foreaches' is like describing Perl's OO as just eliminating the need to create a little hash of references to packages. Although it is somewhat accurate in theory, it misses the point that the syntax enables a programming paradigm that is more rich and appropriate for certain problem domains (explicit loops and functional programming are not really good partners). In addition to hyperoperators, Damian will tomorrow discuss adverbs in general. Again, the J Primer linked above is a wonderful introduction to adverbs and conjunctions. > > Backtracking: > > Ok, I don't get it at all. Damian, clarification? Backtracking is at the heart of Logic Programming (or Declarative Programming, if you like). This is one of the 3 main programming paradigms (along with procedural and functional). The most popular Declarative language is Prolog. It is great for writing programs that are largely about resource allocation and constraints. There's some links to start you off here: http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?backtracking http://www.cse.unsw.edu.au/~billw/prologdict.html#backtrack http://www.cee.hw.ac.uk/~alison/ai3notes/chapter2_3.html#SECTION003000000000 0000000