Earlier quoted context omitted.
I think Go might become a viable alternative to C for systems programming.
I think that one of the requirements that makes Go unsuitable as a C replacement in this specific case is the presence of the garbage collector. We need a language that we could use to write the garbage collector itself. It has to be a non-GC'd language or at least allow you to use it without linking to the GC.
GCC starts move towards implementation in C++
31–37 of 37 posts
Re: GCC starts move towards implementation in C++
#32I find this statement particularly interesting: For example, I think constructors and destructors are pretty easy and hard to misuse. Now, I am aware that the competence of the average GCC committer probably exceeds that of the average programmer, but still, constructors and destructors are easy to misuse: throwing an exception in the constructor comes to mind, in which case the destructor isn't called. Anything abou…
Interesting indeed. It's good that GCC people start eating their own dog food and allow the use of C++. I'm sure this move will bring improvements to g++.
That is, assuming that GCC doesn't use a ton of GCC-specific extensions, which I'm fairly certain they do.
Re: GCC starts move towards implementation in C++
#33This could be really great for GCC if they pick the right subset. For instance, I could imagine that a GCC that takes advantage of namespaces, overloaded functions, and template functions (notably: not classes, exceptions, or implicit type coersion) to be quite a lot easier to understand than today's deeply preprocessor-dependent GCC. It's easy to assume that C++ implies OO, but you really don't need to go that way,…
Of course, this is all anecdotal. YMMV.
Re: GCC starts move towards implementation in C++
#34Yes, they just allowed it. They're not going to rewrite gcc in C++. But still, why, oh why? Eventhough C++ allows, in some cases, the possibility to use easier syntax for certain constructs, it's not particularly more expressive language than C. I don't know gcc codebase but if they decided to actually reimplement something in C++, it would take a lot of time just to make it comparable to the current C implementation…
Using C++ doesn't require throwing out almost a quarter decade's worth of code.
Re: GCC starts move towards implementation in C++
#35Yes, they just allowed it. They're not going to rewrite gcc in C++. But still, why, oh why? Eventhough C++ allows, in some cases, the possibility to use easier syntax for certain constructs, it's not particularly more expressive language than C. I don't know gcc codebase but if they decided to actually reimplement something in C++, it would take a lot of time just to make it comparable to the current C implementation…
...because large-scale C projects end up reinventing C++ features in a more complicated, error-prone way. C++ is much more expressive than C. It can compete on equal terms with other high-level OO languages, it has some functional features and it contains all of C. On the downside, it's difficult to learn and takes much time to become proficient in. Once you become proficient there's no contest.
Hence, it would make sense to start with C++ in the first place, if only possible, because you will immediately save some months of C coding. However, on any large project the overhead becomes negligible. For example, gcc already has the C codebase written for decades.
The new allowed development language ought to offer not only more power but a lot more power.
Re: GCC starts move towards implementation in C++
#36Re: GCC starts move towards implementation in C++
#37"Both C and Lisp will be available as system programming languages." - From the GNU manifesto Maybe just implement GCC in Lisp? Or am I just nitpicking?