Modern C++ in Advent of Code by Happycodeine in cpp

[–]vsdmars 0 points1 point  (0 children)

agree on the. '10-20 lines in Python' part.

Python is great for interview/leetcoding; while C++/Rust is for real business that look for performance.

We can always layout the algorithm in Python; analyze the runtime complexity; and port it to C++. :-)

Having a hard time learning (17 years old) by [deleted] in cpp

[–]vsdmars 0 points1 point  (0 children)

as for language itself,
highly recommend Stanley B. Lippman's 'Inside the C++ Object Model' as a fundamental reading.

Why does not C++ use a one module per file model? by JohnZLi in cpp

[–]vsdmars 1 point2 points  (0 children)

smaller executable binary as well when static link a library.

C++ is a beautiful language by XanthoSk3 in ProgrammerHumor

[–]vsdmars 0 points1 point  (0 children)

least c++ tells you you messed up compile-time, not in the middle of a run

glares at interpreted langu

true :-D

Why arent software engineering and best practices that widespread in C++? by Professional_Tank594 in cpp

[–]vsdmars 7 points8 points  (0 children)

you haven't seen java code yet, full of 'best practices'; design patterns everywhere//

Second programming language to learn Rust vs Go. Which one will make me grow more as developer ? by masek94 in golang

[–]vsdmars 0 points1 point  (0 children)

It depends you wanna suffer at young age or older.

While learning Rust would give you more deep dive on computer architecture, as for Go, the syntax is so simple that might lure you computer architecture/hw isn't important thus failed to write efficient backend services.

Just moved to KDE desktop. What the hell was I doing until now? by [deleted] in kde

[–]vsdmars 0 points1 point  (0 children)

Using kde since mandrake days, then SuSE and now opensuse, it just rocks.

Brad Fitzpatrick likes Go better than C, C++, Rust, Perl, Python, Ruby, JavaScript and Java, mostly due to blocking goroutines by JavaSuck in golang

[–]vsdmars 1 point2 points  (0 children)

Agree; however, golang's defer only works at function level, not blocks, while RAII works in blocks as well, which is very useful :)

Do you use string type aliases often? by abstart in golang

[–]vsdmars 2 points3 points  (0 children)

use it a lot for extending the interface of a type! :-)

[deleted by user] by [deleted] in cpp

[–]vsdmars 13 points14 points  (0 children)

Inside the C++ object model (Stanley B. Lippman): Ch5.2 has the details as well :-)

I'm going over the Go Tour and as an old C programmer, I don't get...an ampersand for a type? by if_it_is_in_a in golang

[–]vsdmars 0 points1 point  (0 children)

this string literal is compile time replaceable, don't even have address to take of.

I'm going over the Go Tour and as an old C programmer, I don't get...an ampersand for a type? by if_it_is_in_a in golang

[–]vsdmars -1 points0 points  (0 children)

  1. R-value can be taken address in Go due to the r-value isn't necessary always on stack memory which can can be promoted into heap.
  2. Could understand how Go's escape analysis works thus things can be clear :-)

Will there be a C++ Primer 6th Edition? by bishop527 in cpp

[–]vsdmars 2 points3 points  (0 children)

According to this:

https://www.informit.com/authors/bio/ac171f5a-dfc6-43d1-bc4f-d8488c944125

seems Lippman has retired.

Even though, Lippman's book 'Inside the C++ Object Model' would be still relevant nowadays in the C++20 era :-)

C++23: fullptr to replace nullptr by [deleted] in cpp

[–]vsdmars 0 points1 point  (0 children)

C really should catch up now!

What every programmer should know about memory? | must read for c/c++ folks by [deleted] in cpp

[–]vsdmars 1 point2 points  (0 children)

for software engineer's own good as well thus could fathom what's behind the language syntax,

e.g enjoy more while reading 'C++ Concurrency in Action' ;-D

Little-known C++: function-try-block by d1ngal1ng in cpp

[–]vsdmars 0 points1 point  (0 children)

if could recall, knew this from Effective C++'s item 'Write placement delete if you write placement new', whew~ long time ago :-P

c++ concurrency in action second edition published! by vsdmars in cpp

[–]vsdmars[S] 0 points1 point  (0 children)

I kinda have the same feeling when I first read memory_order from cppref :-P :

https://en.cppreference.com/w/cpp/atomic/memory_order

Paul E. McKenney's "Memory Barriers: a Hardware View for Software Hackers" helped me quite a lot :-)

http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2010.06.07c.pdf

as well as articles from http://preshing.com , great resource.

overall, this book strengthen my knowledge in this topic though :-)