Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
fine-grained Enumerable-like modules - a reference
Its Me
11/28/2004 4:40:00 AM
Some interesting ideas for fine-grained modules (in fact, down to downright
miniscule modules) in:
http://www.sds.lcs.mit.edu/Larch/handboo...
They use slightly different language, but the essense seems to be there:
Ruby => Larch
module => trait
includes => includes
code => introduces + asserts + implies
module parameterized by includer methods => trait with parameter
expects to be provided by includer => trait parameters, assumes
Here are some of their 'modules':
Maps
hashes, hash composition, arrays..
Containers
Sets, Bags, etc. and operations
LexicographicOrder
defines lex ordering for any string-like thing
MinMax
defines min, max for anything with appropriate <=
DerivedOrders
defines any 3 comparison operators, given the fourth
Relation
relational operators and predicates, leading up to ...
Graph
with graph operators
Cheers!
1 Answer
gabriele renzi
11/28/2004 11:48:00 AM
0
itsme213 ha scritto:
> Some interesting ideas for fine-grained modules (in fact, down to downright
> miniscule modules) in:
>
http://www.sds.lcs.mit.edu/Larch/handboo...
the linnean separation of micromodules is interesting for me, but maybe
is not completely useful in a untyped language.
I'd like to see some more in ruby, anyway, i.e. an Association/Map mixin
for Hash-like objects and a couple of Readable/Writable mixins.
But I don't think matz is a great fan of them :/
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
fine-grained Enumerable-like modules - a reference
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password