well, "cognotive" load makes me laugh. you're basically arguing that this is simple:
// main.cpp
#include "math_session.h"
int main(){
run_math_session();
return 0;
}
// math_session.h
#pragma once
void run_math_session();
// math_session.cpp
#include "math_session.h"
#include <iostream>
using namespace std;
void run_math_session(){
int a, b;
cout << "input number a: " << endl;
cin >> a;
cout << "input number b: " << endl;
cin >> b;
cout << "the sum is: " << (a+b) << endl;
}
but this is hard:
// main.cpp
#include <iostream>
using namespace std;
int main(){
int a, b;
cout << "input number a: " << endl;
cin >> a;
cout << "input number b: " << endl;
cin >> b;
cout << "the sum is: " << (a+b) << endl;
return 0;
}
and tbh, this view just makes me think "ok, you do your thing, i do my thing"