Click here to Skip to main content
15,892,537 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Member 91670579-Apr-19 21:38
Member 91670579-Apr-19 21:38 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Mike Winiberg10-Apr-19 2:32
professionalMike Winiberg10-Apr-19 2:32 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Dean Roddey10-Apr-19 7:52
Dean Roddey10-Apr-19 7:52 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Kiriander10-Apr-19 20:00
Kiriander10-Apr-19 20:00 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Dean Roddey10-Apr-19 20:53
Dean Roddey10-Apr-19 20:53 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Nand329-Apr-19 21:45
Nand329-Apr-19 21:45 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Thornik10-Apr-19 2:54
Thornik10-Apr-19 2:54 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Rick Shaub10-Apr-19 4:56
Rick Shaub10-Apr-19 4:56 
Let's compare these two equivalent code snippets:
C++:
auto start = std::chrono::high_resolution_clock::now();
  
doStuff();

auto stop = std::chrono::high_resolution_clock::now(); 

auto diff = stop - start;
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(diff);
std::cout << "Elapsed ms: " << ms.count() << " ms\n";


Python:
start = time.perf_counter()

do_stuff()

stop = time.perf_counter()
ms = (stop - start) * 1000.0
print('Elapsed ms: ', ms, ' ms')


In this case, the equivalent code is pretty similar, but modern C++ is generally more verbose out of the box.
GeneralRe: Is the new C++ as easy to use as Python? Pin
Dean Roddey10-Apr-19 7:49
Dean Roddey10-Apr-19 7:49 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Rick Shaub10-Apr-19 8:25
Rick Shaub10-Apr-19 8:25 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Dean Roddey10-Apr-19 8:34
Dean Roddey10-Apr-19 8:34 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Rick Shaub10-Apr-19 8:51
Rick Shaub10-Apr-19 8:51 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Dean Roddey10-Apr-19 8:57
Dean Roddey10-Apr-19 8:57 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Rick Shaub10-Apr-19 9:29
Rick Shaub10-Apr-19 9:29 
GeneralRe: Is the new C++ as easy to use as Python? Pin
Dean Roddey10-Apr-19 9:33
Dean Roddey10-Apr-19 9:33 
GeneralSpring Cleaning Pin
Matthew Dennis9-Apr-19 6:19
sysadminMatthew Dennis9-Apr-19 6:19 
GeneralRe: Spring Cleaning Pin
Chris Maunder9-Apr-19 6:59
cofounderChris Maunder9-Apr-19 6:59 
GeneralRe: Spring Cleaning Pin
OriginalGriff9-Apr-19 8:03
mveOriginalGriff9-Apr-19 8:03 
GeneralRe: Spring Cleaning Pin
Chris Maunder9-Apr-19 8:04
cofounderChris Maunder9-Apr-19 8:04 
GeneralRe: Spring Cleaning Pin
OriginalGriff9-Apr-19 8:12
mveOriginalGriff9-Apr-19 8:12 
GeneralRe: Spring Cleaning Pin
swampwiz9-Apr-19 8:12
swampwiz9-Apr-19 8:12 
GeneralThought of the Day Pin
OriginalGriff9-Apr-19 4:42
mveOriginalGriff9-Apr-19 4:42 
GeneralRe: Thought of the Day Pin
Ravi Bhavnani9-Apr-19 5:04
professionalRavi Bhavnani9-Apr-19 5:04 
GeneralRe: Thought of the Day Pin
jeron19-Apr-19 5:05
jeron19-Apr-19 5:05 
GeneralRe: Thought of the Day Pin
Rajesh R Subramanian9-Apr-19 7:12
professionalRajesh R Subramanian9-Apr-19 7:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.