Skip to content

c_vs_cpp: various improvements#13

Open
easyaspi314 wants to merge 2 commits intoeisenwave:masterfrom
easyaspi314:master
Open

c_vs_cpp: various improvements#13
easyaspi314 wants to merge 2 commits intoeisenwave:masterfrom
easyaspi314:master

Conversation

@easyaspi314
Copy link
Copy Markdown
Collaborator

@easyaspi314 easyaspi314 commented Nov 25, 2021

pros to C:

  • only does what you say
  • easy to mix with other languages

pros to C++:

  • RAII prevents resource leaks
  • stricter syntax prevents subtle bugs

rewrite Which is faster section:

  • uses simpler wording
  • mentions the STL avoiding poorly written DIY code

by easyaspi314#1497

pros to C:
 - only does what you say
 - easy to mix with other languages

pros to C++:
 - RAII prevents resource leaks
 - stricter syntax prevents subtle bugs

by easyaspi314#1497
Points made:
 - C++'s standard library avoids inefficient DIY code
 - C++ uses a more efficient string representation
 - C++ can hide many slow operations behind abstractions

Also uses simpler wording.

--easyaspi314#1497
@easyaspi314 easyaspi314 changed the title c_vs_cpp: Mention type checking, raii, ffi c_vs_cpp: various improvements Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant