Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > To go with Go or C/C++?

Reply
Thread Tools

To go with Go or C/C++?

 
 
Victor Bazarov
Guest
Posts: n/a
 
      05-01-2013
On 5/1/2013 1:22 PM, Melzzzzz wrote:
> On Wed, 01 May 2013 18:11 +0100
> Rui Maciel <(E-Mail Removed)> wrote:
>
>> Melzzzzz wrote:
>>
>>> That's for sure. But to really understand C (or motivation behind
>>> it), one has to know at least one assembler.
>>>

>>
>> Nonsense.

>
> Oh yeah...
> You don;t need to know C in order to program in C++, as well...
>
>>
>> Queue in the "no true scotsman".

>
> So you can do system programming without understanding/knowing hardware
> you program?


Hello! It's *system* programming, silly. All you need to understand or
know is the *system*. Hardware-shmardware!...

V
--
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
 
 
 
Gerald Breuer
Guest
Posts: n/a
 
      05-01-2013
Learn C first because you need a magnitude of time less to learn.
Then learn C++ and forget some idioms of C-programming.
 
Reply With Quote
 
 
 
 
Melzzzzz
Guest
Posts: n/a
 
      05-01-2013
On Wed, 01 May 2013 13:54:05 -0400
Victor Bazarov <(E-Mail Removed)> wrote:

> On 5/1/2013 1:22 PM, Melzzzzz wrote:
> > On Wed, 01 May 2013 18:11 +0100
> > Rui Maciel <(E-Mail Removed)> wrote:
> >
> >> Melzzzzz wrote:
> >>
> >>> That's for sure. But to really understand C (or motivation behind
> >>> it), one has to know at least one assembler.
> >>>
> >>
> >> Nonsense.

> >
> > Oh yeah...
> > You don;t need to know C in order to program in C++, as well...
> >
> >>
> >> Queue in the "no true scotsman".

> >
> > So you can do system programming without understanding/knowing
> > hardware you program?

>
> Hello! It's *system* programming, silly. All you need to understand
> or know is the *system*. Hardware-shmardware!...
>
> V

"
System programming (or systems programming) is the activity of computer
programming system software. The primary distinguishing characteristic
of systems programming when compared to application programming is that
application programming aims to produce software which provides
services to the user (e.g. word processor), whereas systems programming
aims to produce software which provides services to the computer
hardware (e.g. disk defragmenter). It requires a greater degree of
hardware awareness.
"

http://en.wikipedia.org/wiki/System_programming

Well, yes, I agree that one need to know system. Depending on task and
system, hardware knowledge is required (or not).

 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      05-01-2013
On 5/1/2013 2:44 PM, Gerald Breuer wrote:
> Learn C first because you need a magnitude of time less to learn.
> Then learn C++ and forget some idioms of C-programming.


Nonsense. "Learn to crawl because it's quicker, then learn to fly while
simultaneously unlearning to crawl." Learning C is a waste of time if
your goal is to learn C++. Even if it takes only a month to learn C
before going over to C++, it's one month too many, especially
considering that certain concepts and idioms *need* to be expunged from
memory. Do it correctly to begin with - start with C++.

V
--
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
Tinxx
Guest
Posts: n/a
 
      05-01-2013
"Picking up enough C++ to start doing good (or harm) in any field does
not really require years of full-time exposure."

Well, that is good news. This is somewhat why I was asking this in the C++ forum.

@Stefan Ram: Great post! Enjoyed a lot reading it. "C is more widespread than C++ ...". This is true according to Tiobe. Makes sense first to learn C.Before you can understand why square root of -1 is a problem you need to understand what a square root is ... Also using C++ as a pimped C or modern C becomes an option this way.

"So you can do system programming without understanding/knowing hardware
you program?"

Well, this makes me realize that I would have to revector as to what to do with C or C++. As I don't have the required hardware knowledge I would change to do some kind of application-independent performance critical development such as socket programming (raw sockets or zeromq.org), number crunching, image processing, something like that).

"Learn C first because you need a magnitude of time less to learn.
Then learn C++ ..."

Think this makes sense as already said earlier. Once saw some C++ code which was full with "extern C" statements. Doing plain C++ without any C is nota reality.

Thanks for all the comments.
Cheers, Tinxx

 
Reply With Quote
 
Gerald Breuer
Guest
Posts: n/a
 
      05-01-2013
Am 01.05.2013 21:37, schrieb Victor Bazarov:

> Nonsense. "Learn to crawl because it's quicker, then learn
> to fly while simultaneously unlearning to crawl."


If there would be a large intersection of crawling and flying
this suggestion might be right.

> Even if it takes only a month to learn C before going over
> to C++, it's one month too many, especially considering
> that certain concepts and idioms *need* to be expunged
> from memory.


These concepts can be expunged almost immediately if you
arent going to develop larger idiomatic C-projects in between.

C++ is a complicated language and learning C++ right from the
start might be too difficult and the learning curve may be too
steep for the novice. So it's educational meaningful to learn
the basic concepts of C which also apply C++ also first.

 
Reply With Quote
 
Balog Pal
Guest
Posts: n/a
 
      05-01-2013
On 5/1/2013 10:57 PM, Gerald Breuer wrote:
> Am 01.05.2013 21:37, schrieb Victor Bazarov:
>
>> Nonsense. "Learn to crawl because it's quicker, then learn
>> to fly while simultaneously unlearning to crawl."

>
> If there would be a large intersection of crawling and flying
> this suggestion might be right.


They both are involved with movement -- and even may be connected by
history. About the same as how C and C++ programming is connected.

>> Even if it takes only a month to learn C before going over
>> to C++, it's one month too many, especially considering
>> that certain concepts and idioms *need* to be expunged
>> from memory.

>
> These concepts can be expunged almost immediately if you
> arent going to develop larger idiomatic C-projects in between.


My experience shows that established C programmers fare pretty badly
with C++ in general and good C++ even more. Rather they fall back to
(likely bad in the first place) habits and write C code in C++, that
falls back on everyone's head. While fresh starters have no such problems.

> C++ is a complicated language and learning C++ right from the
> start might be too difficult and the learning curve may be too
> steep for the novice.


Sure it is, so the way to do it is using a proper learning book or
course that adds elements in proper pace and order. But all C++
elements. Creating a foundation in C++ then build on it more and more.

There is absolutely no necessity to use C as foundation. And we have a
ton of observations that it is a particularly bad and/or dangerous one.
If it weren't going backwards it would still be a waste of time going on
an oblique vector instead right on target.

> So it's educational meaningful to learn
> the basic concepts of C which also apply C++ also first.


Not really -- the basic concepts of C, like "arrays" are there for sake
of compatibility, and carried as undroppable ballast, but can and are
avoided in usage. So they may be skipped for a long time on the the
proper route. Similar applies to usage of the C library.




 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      05-01-2013
Tinxx wrote:
>
> "Learn C first because you need a magnitude of time less to learn.
> Then learn C++ ..."
>
> Think this makes sense as already said earlier. Once saw some C++
> code which was full with "extern C" statements. Doing plain C++
> without any C is not a reality.


Yes it is. You only need to declare something extern "C" if you want to
expose it to C code. My day job is systems programming and I do most of
it in C++. If your system has a C++ compiler, why restrict yourself to C?

Get a copy of "Accelerated C++: Practical Programming by Example", it's
probably still the best learn C++ from the ground up book.

--
Ian Collins
 
Reply With Quote
 
Tinxx
Guest
Posts: n/a
 
      05-02-2013
I think I start with learning C and play around with C calling Lua and viceversa. Maybe some DI framework for C where the configuration definition language is Lua. Might have been done a zillion times before, but it's for fun and learning and you first have to be able to walk before you want to fly.. Knowing plain C is always useful, because C++ is sometimes an overkill ornot the appropriate choice. Then I do some socket programming with zeromq.org first with C and later with C++. This way I can slowly fight my way up at the pace I have time in my spare time.

Thanks for all replies,
Tinxx
 
Reply With Quote
 
Bo Persson
Guest
Posts: n/a
 
      05-02-2013
Gerald Breuer skrev 2013-05-01 20:44:
> Learn C first because you need a magnitude of time less to learn.
> Then learn C++ and forget some idioms of C-programming.


The problem is that you have to forget A LOT of C, like

printf and scanf
C string handling
pointers and arrays
malloc and free
inventing odd names instead of overloaded functions
typedef struct
prefixed names instead of namespaces
pass-by-pointer instead of pass-by-reference
that << and >> are some odd bit shifting instead of I/O operators


How much time have we lost after learning all this?


Bo Persson

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unicode issue with Python v3.3 33 Python 80 04-19-2013 07:16 PM
newbie: Problem with $ and \ in strings vivek_12315 Perl Misc 2 04-12-2013 08:30 PM
name lookup failure using metaclasses with unittests Ulrich Eckhardt Python 7 04-12-2013 02:58 PM
Re: print to screen and file with one print statement amiwinter@gmail.com Python 0 04-09-2013 01:31 PM
USBLock : lock/unlock your computer with a USB key Sven Python 0 04-08-2013 03:21 PM



Advertisments