flat assembler
Message board for the users of flat assembler.

Index > Heap > Learn C++?

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
windwakr,

Every program written right reads good, eh? No matter language involved.
Post 13 Nov 2008, 23:34
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
does whitespace count too?

Smile
Post 13 Nov 2008, 23:57
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Borsuc wrote:
dap wrote:
[list][*]The static and extern don't have the same meaning in different contexts
Well they are only used in multi-object projects, if you have only one file, it's better to name everything static since it'll allow file optimizations.

Remember the meaning "static" has inside function blocks, though Smile

Btw, are you sure that libc isn't part of the ANSI standard? It's described in the K&R book... just like I belive STL/libc++ is part of the ISO standard, and at least is described in Bjarne Stoustrup's "the C++ programming language".

Doesn't mean you have to use those libraries though, but it's nice that they're there. Even if parts of ANSI libc shouldn't be used, the str* functions as already mentioned are quirky and unsafe. STL/libc++ is better and is extensible, but has a bit of a learning curve, and some parts can be quirky to use because C++ doesn't (yet) have lambda functions, and you thus need to separate code into functor objects. But it's pretty OK for normal(*1) program development.

(*1): outside of embedded development on tiny architectures, or for extremely performance-constrained code.

_________________
Image - carpe noctem
Post 14 Nov 2008, 00:06
View user's profile Send private message Visit poster's website Reply with quote
drhowarddrfine



Joined: 10 Jul 2007
Posts: 535
drhowarddrfine
Yes, you are right. And it's part of POSIX, too.
Post 14 Nov 2008, 04:48
View user's profile Send private message Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
@f0dder: I understand what you mean with the standard library. I didn't say it's useless. I said that learning C doesn't necessarily mean you have to learn the standard library as well: you can program without it just as you do in asm.

Thus for those that don't want it (since they are used to asm for example) they can ignore it. Or for those that want optimizations and a lot of control etc..


and yeah I forgot about the static inside function blocks Embarassed

_________________
Previously known as The_Grey_Beast
Post 14 Nov 2008, 13:23
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Borsuc: I quite agree with you. ANSI LIBC is, like, OK... but it does show that it's been around before I was born. If you think of the alternatives back then, I think it's quite OK Smile. But because it's such a widespread language, changes take (too much) time.
Post 14 Nov 2008, 17:42
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
baldr wrote:
...K&R C was supposed to be somewhat higher than assembler,...
In my opinion, C, developed in 1972, thirty six years ago, was supposed to be somewhat "lower" than FORTRAN, COBOL, LISP, MUMPS, or BASIC. It was intended to replace Assembly language, in the sense that one required an efficient, compiled language which could operate on any number of cpu architectures, (four decades ago, there were multiple cpu architectures!). So, C (in those days) was viewed by mainstream business and computer science communities as esoteric, and strictly academic. When I returned to USA in December 1979, looking for work, as a C programmer, I sent my resume far and wide. But, no one wanted a guy who knew C. All they wanted was someone to program in COBOL,or FORTRAN. A few outfits sought LISP programmers. Nobody, I mean zero interest, no one wanted a C programmer. I looked in Miami, New York, Chicago, Detroit, San Francisco, and Los Angeles. I finally gave up, and returned to Europe.
So, I don't share the opinion of those who regard C as a "high level" language, though of course, compared with ASM, it is a HLL.
C++, in my opinion, represented the USA version of Pascal/ModulaII/Ada. In other words, the academic community pushed Pascal, in colleges, and the engineering community preferred C, because of UNIX, by the mid 80's, so, C++ evolved to address shortcomings with C, vis a vis Pascal.

f0dder wrote:
If you think of the alternatives back then, I think it's quite OK
agree.
Post 14 Nov 2008, 22:59
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.