103 points · by goranmoomin · 6y ago · 23 comments
- "The C++ Standard Library, 2nd Edition" from Rainer Grimm
- "C++ Templates, The Complete Guide, 2nd Edition" from David Vandevoorde, Nicolai M. Josuttis, Douglas Gregor
- "Functional Programming in C++" from Ivan Čukić
- "Concurrency with Modern C++" from Rainer Grimm
And any talk from Bjarne or Herb at CppCon or C++Now.
It will eventually get there, but it isn't there yet.
What are the GUI frameworks in other languages? Qt? wxWidgets? GTK? These are all so, so, so bad.
I'm saying this as I'm writing my own GPU-rendered immediate-mode GUI toolkit with multiple rendering backends. I can't do this in any other language, like...I would legit get stuck on the build systems. You are right, it would be better if there were somewhat better frameworks but I'm ok writing my own.
As an aside, my long term dream is to write a next-gen OS in Rust. GPU-first, new application paradigms, compiler comes with the OS, first-class networking support.
The languages empowers you to an insane degree.
What Windows/macOS systems programming would you want?
Part of the appeal of Rust is that there aren't as many bad parts as with C++.
if x:
if y:
f()
g()
You only need to keep track of whitespace (spaces and/or tabs) after a newline (and you can skip lines with only whitespace & comments). It's also useful to keep tracks of delimiters (like parentheses and brackets), if you want to ignore newlines/indents inside expressions (like Python).The easiest IMO is writing a lexer using a lexer generator (Lex, Flex, ...) and outputting a NEWLINE(spaces) tokens, then have another class that keeps track of indents, parentheses, etc.
I wrote a lexer/parser combo that (1) tracks whitespace in top (file) context, (2) ignores whitespace in expressions (parentheses, [] arrays, {} records), except (3) restarts indentation-tracking in {} blocks (even if they're in parentheses themselves!) - now that's hard to code (and debug LOL).
http://doc.pypy.org/en/latest/parser.html
https://bitbucket.org/pypy/pypy/raw/b7b76322a4a7f53db98a883d...