Advertisement
Guest User

Untitled

a guest
Nov 16th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Problem 1:
  2. pro: saves space
  3. con: processors read data 4 bytes (32bit) or 8 bytes (64bit) at a time, having bool as one bit will cause alignment issues
  4.  
  5. Problem 2:
  6. GC frees unused memory
  7. pro: user doesn't have to do manual memory management/memory leaks prevented
  8. con: costly and slow(? unsure)
  9.  
  10. Problem 3:
  11. pro: code runs faster
  12. safety: yes. unnecessary code is skipped
  13.  
  14. Problem 4:
  15. C++: else is matched to the nearest if
  16. Java: same as C++
  17. Ruby: if/else statements need to be closed with end
  18. Python: based on indentation
  19.  
  20. Problem 5:
  21. [! very unsure, look for other resource if possible !]
  22. name type eq: equal if they have the same name
  23. struct type eq: equal if they have the same structure (contents of a data type and how they're ordered)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement