archives

Smalltalk case-statement

When the tutor said that Smalltalk has no case-statement, he meant it has no case-statement in the base class library.

Wiki page that shows you how to write a case construct with Smalltalk's surprisingly versatile syntax. Here's what it looks like:

aValue switch
   case: [matchCode1] then: [actionCode1];
   case: [matchCode2] then: [actionCode2];
   ...
   default: [otherCode].

Curry/Howard and Disjunction

Whilst tralling for Propositions-as-Types references a question arose about the difference between disjunction in propositional logic calculi and sum-types in PLs.

To the best of my knowledge Curry/Howard makes a connection between the 2 concepts even though disjunction is an inclusive-or and sum-types are exclusive, e.g.

A v B ~= A | B | A x B

Am I missing something?

Is choice disjunction in CL also exclusive?

Geometric Algebra

Shamelessly abusing LtU, I want to point out Geometric Algebra (for those who haven't come across it and would find it interesting.) Some BS rationalizations for why this is appropriate for LtU are: GA is applied to aspects such as computer graphics and computer vision also there's this quote on Leo Dorst's page (which is moving to here): "It is going to be the way computer science deals with geometrical issues." More PLT specific is the design and implementation of libraries, DSLs, and/or software for GA; implementations greatly benefit from compile-time (or even runtime) specialization. For example, Jaap Suter's C++ Clifford library uses template metaprogramming to this end.

However, the real reason I'm posting this is that there are quite a few intelligent people here; I know that at least some are interested in things beyond computer science, and I genuinely think they'd benefit from and value geometric algebra.

Leo Dorst's page is more directed toward computer scientists while David Hestene's page (the first link) is more physics biased.