jducoeur: (Default)
[personal profile] jducoeur
In my continuing explorations of functional and higher-order programming, I just came across the Up Library, and the series of blog posts that motivate it. This is *wild* stuff, and helps explain some of the strangenesses in Scalaz. Basically, it starts with a demonstration that Scala's type system is, itself, a full programming language, and then goes to town with it. It starts out seeming like wankery, but it's worth pushing through the series, which eventually gets around to building up concepts like HLists -- arbitrarily heterogeneous, yet completely type-safe, lists. (And thence KLists -- lists of items that share a higher-order Kind: for instance, a List of Lists, where the subsidiary lists have different object types, but you still want to be able to treat them as Lists.)

Brain-breaking stuff, and it's going to take me a while to fully internalize it, but the potential in these examples is clear: if you're willing to get into it, you can push the Scala type system *way* beyond what you would normally expect. This allows you to do things that you'd kind of intuitively *like* to be able to do with complex data structures, but are normally prevented by the type system. He does call out limitations of the Scala type system (and freely admit that he is abusing the system mercilessly), but it's an excellent series for pushing the boundaries of your assumptions about what's possible...

(no subject)

Date: 2011-03-23 08:17 pm (UTC)
laurion: (Default)
From: [personal profile] laurion
Whoa. Sounds like it lands on the 'bend things to do what -you- want them to do' square. Playing with fire, yes, but Prometheus gave us that for a reason...

(no subject)

Date: 2011-03-23 09:00 pm (UTC)
ext_104661: (Default)
From: [identity profile] alexx-kay.livejournal.com
Last time I counted, the game egine I use at work exposes to the Designers *three* different Turing-complete systems. A fourth almost emerged, but I think I've stymied it for the time being...

(no subject)

Date: 2011-03-24 09:23 pm (UTC)
ext_104661: (Default)
From: [identity profile] alexx-kay.livejournal.com
We don't quite have that, as the Programmers guard their level jealously. On the other hand, each of those three systems I mentioned has hooks to communicate with the other two, so we have quite a lot of *sideways* wackiness going on :)

Profile

jducoeur: (Default)
jducoeur

July 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27 28293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags