Comment Re:The THREE shells: (Score 1) 269
Comment Re:Run a completely new OS? (Score 0) 257
Comment Re:Not obvious at all it is problematic (Score 1) 586
C++'s STL fixes this with for_each, transform, and accumulate. All three are looping constructs over a range, but each one has well-defined termination and meaning. For example if I want to visit each element once, I'd use
for_each(begin(container), end(container), some_action);
If I want to mutate it,
transform(begin(container), end(container), begin(destination), some_transforming_action);
and if I want to collapse it down into a scalar,
some_type result = accumulate(begin(container), end(container), initial_value, some_operation);
If you squint at it enough it almost looks like a declarative language, and the compiler is usually smart enough to inline those function calls!
Comment Re:I guess you don't understand languages either (Score 1) 594
You can simulate inheritance in C: just store an instance of the parent struct in the derived struct, and you can access inherited members via self->parent->method( );
Similarily for polymorphism: just cast it to a pointer to the base struct. If you lay your struct out nicely memory-wise this should be a safe operation.
If you can write it in assembly you can write it in C. And all that fancy C++ stuff has to eventually make its way down to ASM at some point.
Comment Re:One good reason... (Score 2) 793
Comment clusterssh (Score 1) 202
If you have ssh access to the laptops then use clusterssh. It's a simple program that takes your keystrokes and sends them to all of the machines you're connected to. So doing an
# aptitude update
# aptitude safe-upgrade
on 30 machines is no harder than doing it to one.
Comment Re:Maximize (Score 1) 1002
For a start, how the hell do you even get a CS degree without doing any interfaces?
Easy: by studying real Computer Science.
Comment Re:end is harder to read (Score 1) 140
Comment Re:end is harder to read (Score 1) 140
If you can't type very fast you'll never be a very productive programmer.
I'm not a very fast typer but I'm a very productive programmer. Maybe it's because I do more thinking than banging my keyboard
Comment Re:So it works the way Stallman envisioned? (Score 1) 191
Comment Re:struct vs. class (Score 1) 553
It also has an effect on inheritance as well. A struct will inherit publicly by default,
struct A : B { };
is the same as
struct A : public B { };
Similarly for classes, but replace "public" with "private".
Both structs and classes are contiguous blocks of memory. The only cases where pointers come into play are when your member functions (methods) are declared as virtual.
Comment Re:Rough times (Score 1) 342
A -> B is the same as !A or B, !(!A or B) is !!A and !B, or A and !B
(Assuming you meant implication by -> (if A then B))