User loginNavigation |
archivesCombining Total and Ad Hoc Extensible Pattern Matching in a Lightweight Language ExtensionCombining Total and Ad Hoc Extensible Pattern Matching in a Lightweight Language Extension. Don Syme, Gregory Neverov and James Margetson.
Quite related to the recent discussions of the relationships between libraries, frameworks and language features. By Ehud Lamm at 2007-05-03 10:40 | Object-Functional | Software Engineering | Type Theory | 3 comments | other blogs | 9247 reads
Functional Object-Oriented ProgrammingI've been experimenting, in Ruby, with something that we may loosely call 'functional' object-oriented programming. I write objects with non-mutating methods -- basically, these objects are stored 'requests' of a certain type. Various values can be derived from the request on demand. If I ever decide to implement caching, well, that wouldn't be functional but it's hidden from the user. Whenever I need actual state in my application, I make sure to split it out from the classes. Instead, I pass stateful information from method call to method call until the result is complete -- saving myself the hassle of state-tracking and so forth. I'm sure there is some efficiency penalty for this approach, though it makes my life much easier (and more reproducible!). There is a similarity between what I am doing and 'continuation passing style' though I can't quite place my finger on it. What do you all think of this style of "functional object-oriented programming"? There are quite a few approaches fucntional object-oriented programming out there already, like FOOPS and Object-Gofer; but these proposals are about faking object-oriented semantics -- a stateful object -- with monads. Rules of good declarative language designI was wondering, are there any. I would normally think of this as the kind of thing that is an art, and not to be guided by rules, but I am having to criticize a declarative DSL that seems poorly designed to me and I would like to have some things to point to. The major initial sin I can see here is that the format is very verbose, requiring the declaration of many things the compiler could find for itself Towards efficient, typed LR parsersTowards efficient, typed LR parsers, François Pottier and Yann Régis-Gianas. In ACM Workshop on ML, March 2006.
|
Browse archivesActive forum topics |
Recent comments
22 weeks 21 hours ago
22 weeks 1 day ago
22 weeks 1 day ago
44 weeks 2 days ago
48 weeks 4 days ago
50 weeks 1 day ago
50 weeks 1 day ago
1 year 5 days ago
1 year 5 weeks ago
1 year 5 weeks ago