Setting Up A Better REPL

One of the very common criticisms of c++ is that it is very complicated. I saw someone on a programming stream yesterday claim that they prefer raw c because it feels more intuitive. To me, this just seems out of touch with reality. Lets look at the simplest REPL, from part 1 of the cstack database from scratch series. I think by the end anyone would agree with me that the c++ version of this code is better in every way to its c counterpart.

Why do I love c++?

Encountering a new programming language can be overwhelming for anybody. Just like everyone else, my first time parsing a c++ program was quite confusing. There are so many new operators and syntax that are different than any other language. What are lambdas? [](){ return what?; }? How many times will I need to look on stack overflow for an explanation of & vs && vs *? How do I make interface-like objects? Templated code is mystifying! I wish c++ had all of the algorithms and iterator tools that I used from python… Seg faults are happening in this large code-base and I don’t have a working debugger for this platform? Yes, welcome to programming hell!

Pagination


© 2019. All rights reserved.

Powered by Hydejack v7.5.2