I don't know what I'm talking about. Nor am I organized in thought. But...

(1) So RAII ~= IDisposing in C#, or "with" in some other languages?
But not the same thing as ref counting smart pointers / arc. (For the
most part, ARC actually is OK as far as I have experienced.) If RAII
is so great, it should not require manual mental boilerplate, it
should be built in for as close to free as possible.
http://www.tomdalling.com/blog/software-design/resource-acquisition-is-initialisation-raii-explained/.
If it is going to be C# explicitly-disposing, or C++ implicitly-raii,
or Obj-C arc, then there's also D's scope(exit) and Go's defer.

(2) I like this blog post
http://coliveira.net/software/raii-is-overrated/ because it starts by
asking some almost 5-why-ish questions like "why do we need automagic
resource freeing, anyway!?" which to me ends up being an advertisement
for linear/uniqueness typing. WWRD? (what would rust do?)

(3) Some point out that exceptions, along with "everything is an
object" are what eff things up, why we need to worry. Not sure I grok
that, but seems like if that's true then effect typing could perhaps
apply.  (e.g. 
http://programmers.stackexchange.com/questions/118295/did-the-developers-of-java-consciously-abandon-raii
which is hilariously sad if you read through all of the comments.)

(4) People like Bacon have done lots of research on GC. There's claims
that things like ref counting can be worse than GC for e.g. pauses
because you can get a storm of dealloc's. Bacon has collectors that
explore the duality of GC vs. RC. Off the top of my head I guess I
always figured RC + cycle collecting was the holy grail.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to