Hundred Year Language

I wrote a message to the LL1 mailing list in response to Paul Graham's Hundred-Year Language essay. Here it is.

On Thu, 10 Apr 2003, Matt Hellige wrote:

> "How far will this flattening of data structures go? I can think of
> possibilities that shock even me, with my conscientiously broadened
> mind. Will we get rid of arrays, for example? After all, they're just
> a subset of hash tables where the keys are vectors of integers. Will
> we replace hash tables themselves with lists?"

A lot of this is actually the approach taken by Haskell (and, I imagine, other related languages), in which the only real data construct is the algrabraic (tagged) data type. Everything else is basically syntactic sugar (or "semantic sugar", which I'll explain in a bit).

I've been playing with the idea of a language where even the difference between data structures and functions is erased.

You can think of an n-ary function as a simple n-ary array of values. If you allow assigning to the result of a function (meaning that the function should return the assigned value the next time it's called), then functions can take the place of data structures, and vice versa.

Since you used the example of Haskell lists, here's my own list example, using a C++ syntax:

class List {
    List() {
        size() = 0;
    }
int size();
T get(int i);
int append(T val) { get(size()) = val size()++; return size() - 1; } }

Here, get(int) and size() are basically N-array arrays -- they have no side-effects, and their value is simply determined by whatever value was assigned to them last. I usually assume a semantics where functions are initially undefined everywhere, and attempting to read an undefined value results in an error (so get(0) would assert if you hadn't called append yet).

This general idea is pretty close to what Paul Graham wrote in his essay:

How far will this flattening of data structures go? I can think of possibilities that shock even me, with my conscientiously broadened mind. Will we get rid of arrays, for example? After all, they're just a subset of hash tables where the keys are vectors of integers. Will we replace hash tables themselves with lists?

I've basically done exactly what he described, but then lumped in functions too.

I'm not sure whether this is a good idea -- I generally prefer statelessness, and I'm not sure it's a good idea to introduce state into previously-stateless features like functions. I started following this idea because I was trying to define a specification language for data structures, and since the data structures I was interested in involved state, this was the natural way of doing it.

On the other hand, at least the state is constrained to a class. It's really no worse than having member variables supporting the public methods of a class. And for the data structures I'm interested in (e.g. in-memory caches of on-disk indices), state of some sort is a necessity.

Posted on April 10, 2003 01:50 PM
More languages articles

Comments

Another interesting response to the same essay.

Posted by: kimbly at April 12, 2003 09:01 PM

Another interesting response.

  • Firstly, programming languages in the future will likely to be more about productivity than raw power.
  • Secondly, programming languages in the future will likely to be more concise, building around a simple core.
  • Thirdly, programming languages in the future will likely to aggregate different paradigms.
  • Fourthly, programming languages in the future will likely to make use of good development environments to improve productivity.
  • Fifthly, programming languages in the future will likely to find a way to balance terseness and readability
  • Finally, programming languages in the future will likely to integrate extensible mechanisms in their syntax, allowing programmers to grow the language as needed.
Posted by: kim at May 22, 2003 12:07 PM

We are the best online sales for the china wholesale . Here you can have a large of choices of kinds Ugg Boots,Converse Shoes,Timberland Boots,puma shoes,Nike Shox Shoes ,Nike Dunk SB Shoes,Nike Air Max,Links Of London,Tiffany Jewelry,Dior Handbags?,jimmy choo handbags ,Cartier Watches, 8GB Mp4 Players,Bluetooth Car DVDs. All our cheap online cheap goods are high quality and original packages, and best service. We offer our customers the best service, 7 days arrive at your door.Enjoy your easy and happy shopping with us.

Posted by: cheap goods sale. at November 20, 2009 12:44 AM

People all over the world know the abercrombie and fitch,but not everyone really knows how fashion the abercrombie is,hollister is the Legend maker. Everybody wears the hollister clothing would be the abercrombie mens and the abercrombie womens, if you want know you can search the Ruehl No.925 or abercrombie outlet in the www.google.com .

Posted by: fitch at November 24, 2009 08:52 PM

Laptop Battery Laptop Battery Laptop Batteries
Laptop Batteries discount laptop battery
discount laptop battery
notebook battery notebook battery
computer battery computer battery
replacement laptop battery replacement laptop battery
notebook batteries notebook batteries

Posted by: Laptop Battery at November 24, 2009 10:27 PM

Just wanted to say great job with the blog, today is my first visit here and I’ve enjoyed reading your posts so far
ugg bailey button
Wow, my ugg classic mini will not be coming off now! I’ve had them on for 12hrs strait and I do not want to take them off. Thanks for everything, well worth the wait.

Posted by: ugg bailey button boots at November 30, 2009 06:10 AM
Post a comment









Remember info?




Prove you're human. Type "human":