Earlier quoted context omitted.
> A single language needed to solve all problems is a fallacy. Has that been proven and do we have pointers to any peer reviewed papers on that? Because else its just an old's wives tale. I don't see any logical impossibilities for one language to solve all problems (meaning, to work well for at least 4 domains: OS and drivers a la C, apps/games a la C++, network programming a la Go, Java etc, and scripting a la Pyth…
Mesa/Cedar, Ada, Oberon(-2) and Modula-3 come to mind as such languages. Specially the interactive environments of Mesa/Cedar and Oberon OSes.
Why I don't spend time with Modern C++ anymore
141–150 of 264 posts
Re: Why I don't spend time with Modern C++ anymore
#142In my experience, the opposite of what the author claims is true: modern C++ leads to code that's easier to understand, performs better and is easier to maintain. As an example, replacing boost::bind with lambdas allowed the compiler to inline functor calls and avoided virtual function calls in a large code base I've been working with, improving performance. Move semantics also boosted performance. Designing APIs wit…
Can you comment on the memory safety of modern C++? I am wondering if I should learn Rust or modern C++.
Re: Why I don't spend time with Modern C++ anymore
#143Earlier quoted context omitted.
How do you know that it is c++11 switch that dramatically increased your compile time, instead of the header file and the headers it includes? Two conditions are changed, and you feel confident that one of them is responsible for the outcome. Why?
Because it's a C++11 header that doesn't exist in C++98. And I cannot compile that version without switching to C++11 mode. Edit: there appears to be some confusion here. I don't include the C++11 header myself. I include a public API header of another project which now happens to include a C++11 header in their public include file. Unless I want to stay on the old version of that API and accept the risks, I don't ha…
Re: Why I don't spend time with Modern C++ anymore
#144“There are only two kinds of languages: the ones people complain about and the ones nobody uses.” - Stroustrup. C++30, might end up being D, today.
C++ is like Java, it will pull in features of other languages years after they have been proven to be valuable and useful, not that there is anything wrong with that. There is something to be said for a slow moving target that you can kinda rely on to work well. If anything I think C++ went off the rails when they started innovating in the language space and tried to introduce all sorts of novel features that other languages hadn't prototyped. I think of all the nonsense around templates that they introduced and how generally the consensus is not to use any advanced template features.
Re: Why I don't spend time with Modern C++ anymore
#145Earlier quoted context omitted.
Well, we also have to thank C for the set back in optimizing compilers. Fran Allen. In Coders at Work (pp. 501-502): --- Begin Quote --- -Seibel-: When do you think was the last time that you programmed? -Allen-: Oh, it was quite a while ago. I kind of stopped when C came out. That was a big blow. We were making so much good progress on optimizations and transformations. We were getting rid of just one nice problem a…
ah your siding on the lisp machine vs todays hardware arch. I think if the lisp hardware architecture has significant advantages we`ll see that emerging in "soft cpu`s" on fpga`s. Particularly as the Xeon/FPGA gear gathers steam.
Intel MPX, CHERI are just two modern approaches of reusing those ideas to tame C's memory issues.
Going back to FPGAs, I think function composition is very similar to digital circuit design, so FP concepts could be a very nice way to do GPGPU programming instead of the actual mainstream approaches. But it would require the GPU to be more FPGAs like.
Re: Why I don't spend time with Modern C++ anymore
#146In my experience, the opposite of what the author claims is true: modern C++ leads to code that's easier to understand, performs better and is easier to maintain. As an example, replacing boost::bind with lambdas allowed the compiler to inline functor calls and avoided virtual function calls in a large code base I've been working with, improving performance. Move semantics also boosted performance. Designing APIs wit…
> In my experience, the opposite of what the author claims is true: modern C++ leads to code that's easier to understand, performs better and is easier to maintain. Can you comment on the memory safety of modern C++? I am wondering if I should learn Rust or modern C++.
In my opinion you should probably learn Rust unless you want to get a job writing C++ (e.g. game development).
Re: Why I don't spend time with Modern C++ anymore
#147Earlier quoted context omitted.
Parallelism: yes, although OpenMP isn't nearly as accessible as e.g. Swift async closures. C++ only got proper language-native threading in C++11. for large scale programming the only sane model is a flat, cache coherent one Do google view their datacenters as a single flat cache-coherent memory space? No, they built mapreduce instead. That's the point of view I'm coming from: distributed systems engineering working…
"Parallelism: yes, although OpenMP isn't nearly as accessible as e.g. Swift async closures." I'm not familiar with them, do you have a pointer? Cilk does have powerful semantics and a very light weight syntax. "C++ only got proper language-native threading in C++11." Sure, but OpenMP and Cilk are significantly older. "Do google view their datacenters as a single flat cache-coherent memory space?" No, but I'm pretty s…
Re: Why I don't spend time with Modern C++ anymore
#148Earlier quoted context omitted.
Can't really argue about 1. About 2, in-order single instruction execution hasn't been an assumption for a very long time; c and c++ optimizers (and programmers) have been able to take advantage of these CPU features for a while. There are language extensions (Cilk++, OpenMP), to take advantage of extra cores for fine grained parallelism. Regarding GPUs, arguably C and C++ have the most mature and transparent offload…
> Regarding the flat memory model, for large scale programming the only sane model is a flat, cache coherent one; those architectures that don't provide that, either evolve to provide it or die (cf. CELL) supplanted by those that do (yes, that doesn't mean that all memory is the same, but that is true with your standard CPU anyway). CUDA on Nvidia GPUs gives a non-coherent last level cache. Most programs distributed…
Re: Why I don't spend time with Modern C++ anymore
#149In my experience, the opposite of what the author claims is true: modern C++ leads to code that's easier to understand, performs better and is easier to maintain. As an example, replacing boost::bind with lambdas allowed the compiler to inline functor calls and avoided virtual function calls in a large code base I've been working with, improving performance. Move semantics also boosted performance. Designing APIs wit…
Some code bases have no real way around that, but many are served well enough with precompiled headers.
Re: Why I don't spend time with Modern C++ anymore
#150Earlier quoted context omitted.
"Parallelism: yes, although OpenMP isn't nearly as accessible as e.g. Swift async closures." I'm not familiar with them, do you have a pointer? Cilk does have powerful semantics and a very light weight syntax. "C++ only got proper language-native threading in C++11." Sure, but OpenMP and Cilk are significantly older. "Do google view their datacenters as a single flat cache-coherent memory space?" No, but I'm pretty s…
All the HPC I've done is explicitly message-passing. There's certainly no abstraction layer that allows, me to treat it is a single memory space.