mardi 6 janvier 2015

Which programming paradigm style does C++11 fit in? [on hold]

This below program is passing function to a thread constructor of class std::thread.



#include <iostream>
#include <thread>

void thFunc() {
std::cout << "Hi from thread\n";
}

int main() {
std::thread th(&thFunc);
std::cout << "Hi from main!\n";
th.join();
return 0;

}


Which programming paradigm style does does programming in C++11 standard fit into? Java's style of creating thread is by overriding class Thread's run() method or implements interface Runnable which is OOPs paradigm style of programming. Because paradigm drives the approach at design time.


Having miscellaneous features of functional programming in new versions of Java is up to the convenience of programmer to use it.


Aucun commentaire:

Enregistrer un commentaire