Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » The Go Programming Language (by Google)

This thread is locked; no one can reply to it. rss feed Print
 1   2   3   4 
The Go Programming Language (by Google)
ImLeftFooted
Member #3,935
October 2003
avatar

Billybob said:

even multiple ones at the same time (fun)

I enjoy this too. At first you do weird things like

vector<string> s;

for(var itr = s.begin(); itr != s.end(); ++itr)

But eventually you learn to avoid the got'ch'yas.

I also find myself implementing cool features from one language in another. Like split and combine from PHP in C++.

vector<string> explode(char seperator, const string &s);
string implode(char seperator, const vector<string> &ary);

That alone makes parsing directory stuff a breeze.

v = explode('.', dir);

if(v.size() > 1 && v.back() == "txt")
  // the file ends in .txt!

 1   2   3   4 


Go to: