Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wedesoft
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
241.
▲
by
wedesoft
17y ago
Eben Moglen's talk 'Freedom in the Cloud' from last Friday might be relevant in this context: http://www.isoc-ny.org/?p=1338
242.
▲
by
wedesoft
17y ago
No. But you can put a smart pointer object on the stack. #include <boost/smart_ptr.hpp> #include <fstream> using namespace boost; using namespace std; int main() { { shared_ptr< fstream > f( n
243.
▲
by
wedesoft
17y ago
#include <fstream> using namespace std; int main() { { fstream f( "test.txt", ios::out ); f << "Hello" << endl; } // File gets closed // ... return 0; }
244.
▲
by
wedesoft
17y ago
Blocks are objects themselves and they preserve their access to the local variable scope (i.e. they are "lexical closures"). This allows you to write control structures yourself. E.g. if-statement: def my_if( cond ) if cond yi