flat assembler
Message board for the users of flat assembler.

flat assembler > Heap > Do you need C++?

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
I've been thinking these days of learning C++ more deeply. But it seems it's a big language (considering learning the full STL).

Although I'm confortable with C (using Pelles C on Windows and GCC on Linux), I'd like to explore C++ more (maybe for a future programming career?). Although I don't know if it's worth the bloat for using in real world applications.
I like C style a lot. Although I like *some* features C++, but not all.

What's your opinion on C, C++, C# and other C-like languages?
Post 16 Feb 2008, 21:35
View user's profile Send private message Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2468
Location: Bucharest, Romania
I've learned C++ and didn't like it, in fact I wish I wouldn't have wasted my time with it, especially the OOP part.

C++ does bring interesting new features like references for example, but I still prefer C-style (or asm style) since it's more systematic in my opinion, and follows the computer's logic better than the abstract OOP (which I also get VERY confused when reading someone else's code, so it doesn't help readability for ME).
Post 16 Feb 2008, 22:53
View user's profile Send private message Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
Thanks for the answer.
I was thinking about Object Pascal (with Free Pascal) too.
Seems to be a lot cleaner language, even with OOP.
Post 16 Feb 2008, 23:03
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
C++ is vastly superior to C, in all regards. There's a lot of badly written C++ code, though, and a lot of badly written books on C++ as well. And C++ doesn't necessarily mean bloat, mind you. Sure thing, you get a size hit from the standard libraries, but if you're writing real-world programs, ~80kb or whatever isn't a problem.

If you want to learn languages just for employability, go for C# and Java Smile
Post 16 Feb 2008, 23:04
View user's profile Send private message Visit poster's website Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
I think I'll give C++ a chance. Very Happy
No knowledge is waste of time.
I already have a book from Stroutrup. It's very deep book, but not too good at explaining.
Post 16 Feb 2008, 23:18
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
Btw, C++ can be annoying when you need to interface with legacy C code, because of typecasts etc... PlatformSDK is especially annoying, but you get used to it.

The stoustrup book is good, but dry - get Scott Meyers' and perhaps Herb Sutters books when you understand the core language.

One of C++'s core strengths is that it's an old-and-tested language, available on most systems, and generally with pretty decent optimization.
Post 16 Feb 2008, 23:27
View user's profile Send private message Visit poster's website Reply with quote
drhowarddrfine



Joined: 10 Jul 2007
Posts: 535
f0dder wrote:

If you want to learn languages just for employability, go for C# and Java Smile
No, no. Not C#
Post 17 Feb 2008, 05:09
View user's profile Send private message Reply with quote
itsnobody



Joined: 01 Feb 2008
Posts: 93
Location: Silver Spring, MD
I hate C/C++...it really kind of overly complicates things and gives you less power than ASM
Post 17 Feb 2008, 12:13
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4208
Location: 2018
yep
Post 17 Feb 2008, 12:23
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
itsnobody wrote:
I hate C/C++...it really kind of overly complicates things and gives you less power than ASM

That's just because you don't understand it properly, then Smile

_________________
Image - carpe noctem
Post 17 Feb 2008, 13:00
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4208
Location: 2018
with C, u don't need to build all the lib, your code is compilable for every machines, and it's good for productivity.
asm is good to learn and create new things.
Post 17 Feb 2008, 13:40
View user's profile Send private message Visit poster's website Reply with quote
itsnobody



Joined: 01 Feb 2008
Posts: 93
Location: Silver Spring, MD
f0dder wrote:
itsnobody wrote:
I hate C/C++...it really kind of overly complicates things and gives you less power than ASM

That's just because you don't understand it properly, then Smile


nah I understand it and use to use it for a while, but seriously compared to ASM, C++ completely sucks....I mean for instance in C++ you have to use HWND, LONG, and INT and if you don't you get some type of error, in ASM you just use dd for all 3

It has its multi-platform advantages I guess, but I don't really see much reason to use it over ASM, I'd use Java over C/C++
Post 17 Feb 2008, 15:13
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2795
Location: dank orb
drhowarddrfine wrote:
No, no. Not C#
Quote:
Finally, we have also excluded assembly languages, although Turing complete, because they have a very different nature.

_________________
¯\(°_o)/¯ unlicense.org
Post 17 Feb 2008, 15:31
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
Well, that post does show that you don't understand C++ properly.

"Everything is a DWORD" - well, good luck writing 64-bit clean software. Oh yeah, forgot that, you basically have to write two versions of your software if you want both 32- and 64-bit versions doing assembly Wink

Besides, separate types help you catch programming mistakes at compile-time. True, using the PlatformSDK with C++ can be a bit bothersome at times because of all the necessary typecasts, but that's largely because PlatformSDK is old stuff, and was written for C, not C++.
Post 17 Feb 2008, 15:31
View user's profile Send private message Visit poster's website Reply with quote
HyperVista



Joined: 18 Apr 2005
Posts: 691
Location: Virginia, USA
As someone who has worked with commercial firms developing capabilities for some years now, I have to agree with f0dder. C++ and C# (or Java) are the recommended languages to invest your time in if you want the best chances of getting hired for pay. Keep in mind this does not necessariy mean these languages are superior in all cases. It simply means that the industry, for a number of reasons, decided these languages are the ones they choose to develop products on. One can become a zealot for Forth language and you would be justified if the only thing companies were willing to pay for was Sun bootprom code. On the otherhand, if you want your best chances at getting a paying gig as a programmer, C++ and C# (or Java) are your best bet, despite what you may think of them as a programming language.

As a possible indicator of coming trends, which in some sense contradicts the advise I just dispensed, check out this chart. This group tracks trends in the commercial use of programming languages over the course of a year and measures the delta.

It looks like VB use is on the rise (ughhhh) and Lua is really HOT! ???

<edit> If you click on the language name on that chart, you get a nice graphical trend chart that spans several years. It will give you a sense of the realative stability of a language use in commercial products. Comparing LUA with C# you can see that LUA might be a "flash in the pan" language and may be a fading trend. Whereas C# has sustained a steady growth and use trend. </edit>


Last edited by HyperVista on 17 Feb 2008, 15:50; edited 1 time in total
Post 17 Feb 2008, 15:31
View user's profile Send private message Visit poster's website AIM Address Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
LUA is used a lot of program scripting, probably because it's comfortable to work with, has pretty small overhead, and a nice & liberal license. It also hepls that a lot of people are already using LUA (including several commercial games, like Painkiller and World of Warcraft), which gives it a stamp of approval...
Post 17 Feb 2008, 15:43
View user's profile Send private message Visit poster's website Reply with quote
drhowarddrfine



Joined: 10 Jul 2007
Posts: 535
HyperVista wrote:
C++ and C# (or Java) are the recommended languages to invest your time in if you want the best chances of getting hired for pay.
On another forum, I checked job listings in 10 large cities around the country. C# and .NET job openings were only around 15% of all job openings, including Silicon Valley, and most of those positions were with Fortune 500 companies only. Though the numbers fluctuated based on different parts of the country. There were far, far more opportunities in Java and C/C++ (and even PHP, iirc).

Quote:
If you click on the language name on that chart, you get a nice graphical trend chart that spans several years. It will give you a sense of the realative stability of a language use in commercial products. Comparing LUA with C# you can see that LUA might be a "flash in the pan" language and may be a fading trend. Whereas C# has sustained a steady growth and use trend.
The problem with doing it that way is you are comparing least used languages with least used languages. Compared to the market overall, their trend is not that much and sometimes insignificant. (Your link is the same as mine above).
Post 17 Feb 2008, 17:39
View user's profile Send private message Reply with quote
HyperVista



Joined: 18 Apr 2005
Posts: 691
Location: Virginia, USA
drhowarddrfine wrote:
The problem with doing it that way is you are comparing least used languages with least used languages. Compared to the market overall, their trend is not that much and sometimes insignificant.

Not sure about that. As I understand it, the data ranks programming languages by the total number of lines of code used during the year. It seems to me that is a comparison of language use overall, not least used.
drhowarddrfine wrote:
(Your link is the same as mine above)

Oh ... yes. Embarassed Sorry, when I read your post, I thought you underlined C# for emphasis, I didn't see it was a link. Credit to you for finding that link first. Smile
Btw, I've always gotten a big kick out of your nick! Very cool. Very Happy
Post 17 Feb 2008, 18:27
View user's profile Send private message Visit poster's website AIM Address Reply with quote
itsnobody



Joined: 01 Feb 2008
Posts: 93
Location: Silver Spring, MD
f0dder wrote:
Well, that post does show that you don't understand C++ properly.

"Everything is a DWORD" - well, good luck writing 64-bit clean software. Oh yeah, forgot that, you basically have to write two versions of your software if you want both 32- and 64-bit versions doing assembly Wink

Besides, separate types help you catch programming mistakes at compile-time. True, using the PlatformSDK with C++ can be a bit bothersome at times because of all the necessary typecasts, but that's largely because PlatformSDK is old stuff, and was written for C, not C++.


Well in reality they are DWORDs regardless of what you label them

64-bit Windows looks very similar to 32-bit Windows....64-bit seems to be better thought out in design, but benchmarks don't show much of any speed difference in a lot of areas

If you want real multi-platform support then stick to Java, with JIT it's just as fast as C++ and the same bytecode runs on almost any platform
Post 17 Feb 2008, 19:55
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
itsnobody wrote:
Well in reality they are DWORDs regardless of what you label them
On 64bit systems they're QWORDs, not DWORDs Smile

And, really, what gives most information about usage?
MyFileFunction(char *filename, AsyncRecord *par); or MyFileFunction PROTO :DWORD,:DWORD? Even if you add names to the proto, you're allowed to pass anything that fits in a dword without type checking. Bad.

itsnobody wrote:
64-bit Windows looks very similar to 32-bit Windows....64-bit seems to be better thought out in design, but benchmarks don't show much of any speed difference
General speed doesn't change much, but why would it? Most apps sit pretty idle most of the time, and ontop of that most apps are still32bit. If you want speed increase, you have to recompile for 64bit, and only CPU-intensive code has advantage from that. It's not like a 64bit idle loop is more efficient than a 32bit idle loop Wink

itsnobody wrote:
If you want real multi-platform support then stick to Java, with JIT it's just as fast as C++ and the same bytecode runs on almost any platform
Umm... no, JAVA JITers don't generate nowhere code nowhere near the quality of C++ compilers, sorry. For some simple cases they can do okay, but for real-world code, there's a very big difference.

And run on any platform, ho humm. On x86-64, I'm pretty sure the JITer still targets 32bit.
Post 17 Feb 2008, 20:08
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.