monkey_ has quit [Remote host closed the connection]
monkey_ has joined #racket
sonny has joined #racket
sonny has quit [Quit: Client closed]
monkey_ has quit [Remote host closed the connection]
wwalker has joined #racket
bremner has quit [Remote host closed the connection]
bremner has joined #racket
jao has quit [Ping timeout: 276 seconds]
<dpk>
diving more deeply into Racket for the first time, coming from the world of RnRS Scheme with some CL and a bit more Emacs Lisp, i'm curious: why does Racket's class system use a (send object method args ...) macro for ‘method’ invocation, ignoring the decades of Lisp work on single- and multi-dispatch systems which show it's essentially just another way of spelling (method object args ...) like any other Lisp procedure call?
<dpk>
i know of only one disadvantage of the T/CLOS way, which is that both method and obj need to be defined in the namespace where you call the method, whereas with (send ...) you can theoretically have messages with any name without having to define them. but most CL'ers (and I) think this is a reasonable trade-off for a unified procedure call style which encompasses class method invocations, and in the case of CL for also getting multi dispatch
<dpk>
(that disadvantage is reduced further by NO-APPLICABLE-METHOD, which is like Smalltalk's #doesNotUnderstand:, though it does still require that there's *something* defined with the actual name of the method)
<dpk>
i also think it's particularly Schemey for things like public/private method visibility to be controlled by the regular module name export/visibility system, and with the Java style (for lack of a better term) that needs to be reimplemented at the object level
<dpk>
anyway, didn't mean to turn this into a polemic, i'm curious why that design was chosen
ttree has quit [Ping timeout: 250 seconds]
<winny>
I thought I read a paper discussing some of the choices behind racket's OOP implementation... I can't seem to find the one that introduces it
skapata has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
fanta1 has joined #racket
szkl has joined #racket
cwebber has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
random-jellyfish has joined #racket
<random-jellyfish>
is there a package with data collections like queues, stacks, maps, sets with efficient implementations kind of what you find in the C++ STL or the Java standard library?
<random-jellyfish>
the mutable pairs/lists are so rudimentary
<random-jellyfish>
they don't eve have methods to add/remove elements
<random-jellyfish>
I mean I could write them myself, it's not hard
<random-jellyfish>
but I'm wondering if there's something already there that I don't know about
badkins has joined #racket
<bremner>
there's hash-tables, both mutable and immutable. IIRC they both have performance guarantees.
<bremner>
vectors are the goto mutable container, although fixed length
<random-jellyfish>
are there variable length vectors/lists?
<random-jellyfish>
I could make my own using mpairs
<bremner>
well, I mean lists are variable length, but deleting and inserting in the middle is not really idiomatic as far as I know
<random-jellyfish>
I probably won't need delete/insert in the middle just at the ends
<bremner>
well, racket lists are singly linked.
<bremner>
(so inserting at one of the ends is expensive)
<random-jellyfish>
if I use mpairs I would expect set-mcar! and set-mcdr! to be O(1)
<bremner>
yes, that sounds right
<bremner>
there's pfds, but that's more about immutability