Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To me, the only thing that C++ has that all other mentioned languages lack 
is the power you get from the templates and generic programming.
Sorting will always be faster if you can call the comparison function 
directly without using a function pointer, and the only way you can create a 
generic sorting algorithm is that way.

Thinking about it with a cold head, most things to hate about C++ are not in 
the language but in its libraries.
The only feature I hate from the language itself is the preprocessor 
(macros), which you get in C too.

And maybe I also hate the fact that C++ allows for unexperienced programmers 
to create a bunch of classes and hierarchies that make sense to nobody but 
them. Or even worse, unexperienced programmers start writing their own 
frameworks, wrapping and re-wrapping, the same good old C function one 
thousand times.

I guess that is why most C++ based projects out there have a strict list of 
rules and conventions, you cannot have a stable project without them.

But, nothing prevents anybody from programming in C++ the way you describe, 
using simple and clear core structures with some basic methods that 
complement them (not obscure them) and make it easier to write the 
algorithms.
Sadly, once you start using std::string, their overly complicated and fancy 
iostreams, and bulky classes that hide too much from you, I have no other 
choice than to agree and call the whole thing a mess.

Steven Burns


"Linus Torvalds" <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote in message 
news:alpine.LFD.0.999.0709070203200.5626@xxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>
> On Fri, 7 Sep 2007, Linus Torvalds wrote:
>>
>> The fact is, git is better than the other SCM's. And good taste (and C) 
>> is
>> one of the reasons for that.
>
> To be very specific:
> - simple and clear core datastructures, with *very* lean and aggressive
>   code to manage them that takes the whole approach of "simplicity over
>   fancy" to the extreme.
> - a willingness to not abstract away the data structures and algorithms,
>   because those are the *whole*point* of core git.
>
> And if you want a fancier language, C++ is absolutely the worst one to
> choose. If you want real high-level, pick one that has true high-level
> features like garbage collection or a good system integration, rather than
> something that lacks both the sparseness and straightforwardness of C,
> *and* doesn't even have the high-level bindings to important concepts.
>
> IOW, C++ is in that inconvenient spot where it doesn't help make things
> simple enough to be truly usable for prototyping or simple GUI
> programming, and yet isn't the lean system programming language that C is
> that actively encourags you to use simple and direct constructs.
>
> Linus 



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux