One of the best examples is Informix RDBMS which was acquired by IBM in 2000. And the second best is... JVM. ^_^
Zed Shaw on C++
201–210 of 210 posts
Re: Zed Shaw on C++
#202Earlier quoted context omitted.
No compiler error ever ruined a NASA mission.
Funny, but imo misses the point. The beauty of dynamic typing is that it makes the writing of the code easier, which makes development shorter, which gives you more time to thoroughly test your code. After years leading a QA team, I'm convinced that more time testing is always superior to more time writing code, even if the code you're writing is there to stop bugs!
Re: Zed Shaw on C++
#203Re: Zed Shaw on C++
#204Earlier quoted context omitted.
Wow, an MMA analogy on this site? Who are Seth Petruzelli, Roy Nelson, and Matt Mitrione then?
Donald Knuth is Hélio Gracie Edsger Dijkstra is Masahiko Kimura John McCarthy is Yip Man Paul Graham is Bruce Lee Steve Jobs is Fedor Emelianenko Linus Torvalds is Mauricio Rua Bill Gates is Brock Lesnar Steve Ballmer is Eric Esch David Heinemeier Hansson is Anderson Silva Guido van Rossum is B.J. Penn Sergey Brin is Antônio Rogério Nogueira Lawrence Page is Antônio Rodrigo Nogueira
Yukihiro Matsumoto -> Kazushi Sakuraba
Dennis Ritchie, Ken Thompson, Rob Pike -> Royce, Rickson, Renzo Gracie
Joel Spolsky -> Tank Abbot
Bjarne Stroustrup -> Matt Hughes
RM Stallman -> Ken Shamrock
Steve Wozniak -> Mark Coleman
Rasmus Lerdorf -> Jon Fitch
Don Stewart -> Art Jimmerson
Re: Zed Shaw on C++
#205I agree totally with Zed Shaw on this, but some quick observations: * C++ circa 2000 (before mainline g++ could handle Alexandrescuisms) is significantly different from C++ circa 2010, albeit in ways that probably upset Shaw even more (the more central role boost has taken, the more "expressive" templates have gotten, don't call me on any of this stuff). * C++ std::string is an abomination, but you can always just do…
For those with a slightly broader perspective and an inquisitive mind, perhaps you should take a look at at the Reason C++ framwork, specially if you have never seen C++ in its most pure uncomplicated OO form.
Reason is a C++ framework that ive been writing for about 8 years, which aleviates many of the sources of pain highlighted in this discussion. Writing code with Reason is much more like using a dynamic language, with a full library like Java or .Net.
It supports raii, but doesnt use exception handling and doesnt bother with const nonsense or over the top inheritance restrictions. In fact pretty much everything in Reason is public and designed to be derived, modified or enhanced.
It has generic programming features, but doesnt force you to write everything as templates (a classic mistake that the standard library makes). For example, you can have an iterator of int's without caring what the underlying container type is, so your code and algorithms can actually be generic, not just infectious templates.
Unlike a lot of C++ frameworks and libraries, its not specifically focused on networking, or a few esoteric template classes or collection libraries.
Reason is a fully featured systems programming framework with a complete interface to all the usual posix api's and everything else you would expect from a modern language. It has strings, regexes, streams, parsers, sockets, threads, filesystem, encryption, encoding, xml, xpath, collections, time and date, sql (mysql, postgress, sqlite), http (client/server), smart pointers, formatting, logging, and much more.
But the features are perhaps not as important as how it is written. It is simple, and very object oriented, everything is designed to work togeather cleanly and obey the principle of least surprise. Just like Python and Ruby, Reason allows you to do a lot in a very small amount of code.
So if your wondering how you can have the simplicity of C, with just the good parts of C++, heres your answer.
Re: Zed Shaw on C++
#206Earlier quoted context omitted.
Why should memory management related to managing other resources. Anyway, you might be interested in The Haskell Disciplined Disciple Compiler ( http://www.haskell.org/haskellwiki/DDC ) which lets you statically encode resource management rules. (And of course spots garbage collection for memory.)
Your objects contain/use various resources, such as memory, file descriptors, mutexes, etc. The way to reclaim any of these is to destroy the object, which lets you reclaim all of them. So memory management is very much tied to other resource management, since they both involve the same thing (deciding when to destroy objects you no longer need). Unfortunately not all resources can be collected equally lazily, so mem…
I asked why one should mix management of resources, and you answer that one should mix management of resources. But I still don't know why?
Re: Zed Shaw on C++
#207Earlier quoted context omitted.
Try allocating a very large chunk of memory using a high-level language with garbage collector. It's not always about collection.
Why would you allocate a large chunk of memory, when you are using a garbage collected language? There may be reasons to want to mix manual and automatic memory management. If you want to do that, there are language that support it. Like D.
Re: Zed Shaw on C++
#208Earlier quoted context omitted.
Your objects contain/use various resources, such as memory, file descriptors, mutexes, etc. The way to reclaim any of these is to destroy the object, which lets you reclaim all of them. So memory management is very much tied to other resource management, since they both involve the same thing (deciding when to destroy objects you no longer need). Unfortunately not all resources can be collected equally lazily, so mem…
> The way to reclaim any of these is to destroy the object, which lets you reclaim all of them. I asked why one should mix management of resources, and you answer that one should mix management of resources. But I still don't know why?
Re: Zed Shaw on C++
#209Earlier quoted context omitted.
> The way to reclaim any of these is to destroy the object, which lets you reclaim all of them. I asked why one should mix management of resources, and you answer that one should mix management of resources. But I still don't know why?
It's more that how the hell do you unmix them (any why would you bother, anyway)?
For patterns of usage similar to RAII, Common Lisp uses unwind-protect. I already mentioned Disciplined Disciple Compiler that extends Haskell to give static guarantees for following certain rules for resource management.
Why would you bother: RAII only covers some cases for resource management, and most garbage collectors can take an arbitrary long time to collect an object that's no longer reachable. Which is fine for memory, because memory is fungible, but the attached resources, say mutexen, are not necessarily fungible.
Re: Zed Shaw on C++
#210Earlier quoted context omitted.
Wow, had no idea he was at Facebook now. Loki is neat, even if it does represent everything that is evil about C++.
He's also writing (I think it's almost done?) "The D Programming Language", which is pretty highly anticipated.