4 ms·
Oddly enough I'm back to C++ too, after Ruby. One nice thing is; in a fast language, tests run quickly too. Also, Python and Ruby don't have the equivalent of
by joe_the_user 17y ago
Oddly enough I'm back to C++ too, after Ruby.
One nice thing is; in a fast language, tests run quickly too.
Also, Python and Ruby don't have the equivalent of an ASSERT (you could roll your own but it's not standard practice).
Also, C++ has standard hash lists and complicated data structure are actually going to run quickly.
And while memory management can be a pain, you are doing it yourself so you can track down memory leaks rather than having them be inherent in the interpreter...
...as in Ruby AND Mono.
- hazzen 17y agoC++ doesn't actually have a standard "hash list" (I assume you meant hash map or hash set?). Depending on your implementation, you either have hash_{map,set}, unordered_{map,set}, both, or something entirely different. tr1 specified unordered_{map,set}, but tr1 is only technically a proposal, not a standard. I think a safe assumption is that tr1::unordered_{map,set} will be available in all implementations by now, but until C++0x is ratified and implemented by major compilers, you will run into different platforms having (possibly) different implementations. And lets be honest - even after C++0x has been implemented in major compilers, you will still have subtly different/buggy implementations. edit: I had conflated {hash,unordered}_{set,map}. Fixed
- queensnake 17y agoNah, the committee isn't going to change unordered_set or unordered_map; they're struggling with far more urgent things, to finish the std off. Those have already gotten the full treatment, they have the usual std:: collection interface; what's to change?
- grogers 17y agoOr you can use boost::unordered_set right now, in any compiler, whether it supports tr1 or not.
- ubernostrum 17y agoAlso, Python and Ruby don't have the equivalent of an ASSERT (you could roll your own but it's not standard practice). Ahem: http://docs.python.org/reference/simple_stmts.html#the-assert-statement http://docs.python.org/reference/simple_stmts.html#the-asser...
- deleted 17y ago[deleted]
- icefox 17y agoRubyOnRails is very test gunghu, but to run a hello world test takes seconds, anyone know why? This seems very odd. Is this one of those do what I preach, not what I do things?
- techiferous 17y agoI doubt it takes seconds to test a hello world program in Ruby. However, to test a hello world Rails application is a different story, as you have to start up the web server, which takes seconds (even though it eventually just serves a simple page).
- maurycy 17y agoNot necessarily the web server. Standard `rake test:units` (or even `ruby test/units/model_test.rb`) takes the whole Rails stack so it adds up.
- techiferous 17y agoYou're right and I agree. But let's be careful not to equate Rails with Ruby. Rails tests may have a slow startup time, but Ruby tests do not and other Ruby web framework tests may not.
- fauigerzigerk 17y agoBecause if "performance doesn't matter" is repeated often enough people actually start to believe it, and if enough people believe it, it becomes false. Is there a name for this logic? :-)
- Luyt 17y agoConfirmational Bias followed by a Self-fulfilling Prophecy. But you knew that and I think your question was purely rhetorical ;-)