| This is getting ridiculous. We went from: > many Python projects have way more lines of code than equivalent C++ projects To: > It's a bit longer in C++ but frankly not by that much With the proof being literally __twice__ more characters, with one line being more than a 100 characters long. I understand that C++ doesn't have a native JSON lib, and sorting is a bit out there, but giving 3rd party lib access to Python feels like cheating: import pandas as pd
agenda = pd.read_json("agenda.json", convert_dates=["hired"])
for _, (name, age, hired, emails) in agenda.sort_values("name").iterrows():
print(f"{name} ({age}) - {hired:%d/%m/%y}:")
for email in emails:
print(f" - {email}")
I mean, I can also create a lib that does the entire script, install it, and just do 'import answernh; answerhn.print_json("agenda.json")'Now again, this is not so say "Python is better than C++". That's not the point. If you want to write a game engine, C++ makes sense, verbosity doesn't matter, and you don't want the Python GC to kick in. If you want to iterate on your Saas product API quickly, it's probably not the best choice. Why pretend otherwise? What the point of stating the sky is red? |