@kbw,
Assembly language is beautiful. It's beautiful in the same way as an upside-down painting: just because it's incomprehensible, doesn't mean it doesn't look nice.
@chrisname
Is this in the spirit of "beauty is in the eye of the beholder"?
I spent years writing assmbler code 20-30 years ago. You can make it look neat, impose structure on it and so, but it's hardly concise. The language offers absolutely no help, so because of that, I'd say it isn't a beautiful language.
I was joking really; but I do like some aspects of assembly. I feel in control. Actually, that's the same reason I gave for preferring C to C++... Lol, maybe I have some kind of inferiority complex: "The computer does what I tell it... I AM GOD!"
What can C++ do that C can not?
I don't know why, I just prefer C. I don't like OOP. You might say "You don't have to use OOP," but then, I'd just be using C with a C++ compiler.
For some types of programs, I'd agree that C++ is better. Games, for example... I can see how OOP is useful for games; but it's not for me.
C++ isn't constrained to OOP. It's completely reasonable to use exclusively the procedure style.
For those who prefer C, don't you get fed up of the all the casting, declaring variables away from where they're used, no guaranteed intialisation/release, writing your own containers, ...
abstraction: the act of withdrawing or removing something
And pray tell: what exactly do namespaces and visibility remove?
Before you can answer: purely syntactical constructs that are compiled to nothing don't abstract anything.
Well, maybe not namespaces, actually (they're just a way of stopping variable name conflicts, right? You can use static functions in C, but I guess it's easier to use namespaces); but things like protected and private should be obvious. What if I want to know what the value of a private variable is? Should I just use an "accessor function" that may or may not be provided? In C, as there's no private, protected, etc. variables can't hide.
That's not an abstraction, that's a restriction. Abstractions transform what's already there into something more manageable.
Variables: abstract memory locations by giving them names.
Operators: abstract computer instructions to easily remembered symbols.
Control structures: abstract frequently used series of instructions to easy-to-learn-and-remember structures.
Memory locations owned by a process are not inherently inaccessible. Visibility is a compiler-enforced restriction that an interface writer can use to prevent the user from accidentally screwing up internal state. It's not an abstraction because that restriction wasn't there originally.
Abstraction, restriction, either way; it's annoying. Anyway, I can see my argument is getting torn to pieces, so I'll admit that my argument is invalid; but at the same time, I'm still going to stick to C.
call me crazy but I find well written c++ code to be beautiful and elegant. Sure their are prettier languages out there, but c++ is at least a 6 in the look scale...With Luara Prepon as a red head being a 10 and this as a 1 http://static.funnyjunk.com/pictures/that_makes_me_moist.jpg
Something that drives me insane with C++ is that it requires curly braces with try..catch clauses. This is at odds with all other control constructs in the language (except functions).
It usually doesn't bother me, but occasionally you only need something simple like:
1 2 3 4 5 6 7 8
tryswitch (fooey)
{
case bar: ...
case baz: ...
default: ...
}
catch (zippo z) complain( z );
I know it isn't really a big deal, but it drives me nuts.
I think every programming language can produce neat code and horrible code. It depends on the writer and the reader. Like kbw said, "beauty is in the eye of the beholder." I think the GNU indentation style is incomprehensible. They'd probably say the same about my code, I guess (even though looking at my code is like listening to Mozart: you get overcome by the beauty of it).
Java is useful for somethings but it's overused as well as C#. When you create a backend for something that needs to be optimal, you don't go and write it in friggin' Java or C#.
For instance, you may want to use Perl to parse and handle files because of its ease of use. But its not efficient enough to make a game engine in (or is it even possible..?). Java doesn't fit into this category. You may want to use Java for cross-platform abilities? You may want to use Java for its managed programming? I personally feel that the downside of large resource usage and the use of a third party application which is required to be installed is too great to have these features truly be an advantage. I don't know about C#, I've only looked at it, I don't know how it really works. I don't appreciate the use of the .NET framework either.