Quickie Poll -- C vs. C++

C++

So I can endlessly explain that there is not necessarily any overhead, dtors prevent resource leaks, templates can make smaller and faster code, etc.

Seriously: productivity.

Both.

Primarily 32-bit though still some 16-bit (and rare 8-bit quickie).

Varies from 128kb on up to really big.

I wouldn't use ANY library without knowing more. Too much unusable stuff out there, in many languages. Does it come with source and a complete set of regression tests ? If not why would anyone expect it works and is fixable when a bug shows up ?

Yes, and writing...

ts?

Yes, and writing...

Yes.

Don't be silly - of course not.

Reply to
Dave Nadler
Loading thread data ...

Modula2

(but you can use anything for 1KLOC or smaller projects even ASM)

Extremely robust compilers and static analysis testers available. Though now a bit long in the tooth it is still good for mission critical code. Catches many common typos and faults at compile time.

Both.

16 or 32 bit mostly (but sometimes 8 bit PICs).

Ada, Algol, Modula2, PASCAL or FORTRAN. If it has to be between C or C++ then C++ but using only a robust compact subset of the language. Some of these languages tend to bring in the kitchen sink as bloatware.

Yes.

Yes.

What is a sympathetic hardware engineer ;-)

Regards, Martin Brown

Reply to
Martin Brown

Tim Wescott expounded in news:e_edndXHmNJ_EejRnZ2dnUVZ snipped-for-privacy@web-ster.com:

..

Ada

formatting link

Because it's friendly to read, finds lots of bugs before it compiles successfully, and saves a lot of debugging later (debugging on embedded platforms is much more difficult than on our feature rich desktops and servers).

Yep. I just rewrote my C++ project (for AVR) in Ada recently. It uncovered some lurking problems that went unnoticed in testing.

8-bit for the moment (atmega168).

16KB program memory, 1K SRAM. I plan to switch to the atmeg328 (more program memory, 2K SRAM).

I'm happiest using Ada code. Though I often call C code from Ada, since life is too short to rewrite everything. ;-)

Yep.

Yep.

Warren

Reply to
Warren

1) C for anything low level 2) C++ for anything high level (If it's PC based, usually with some number of external libraries to get things done faster).

Very importantly:readability by other people - C or (elementary) C++ is the Lingua Franca in most firms. Also: That's where I have experience With C for low levell stuff: easy to twiddle bits and get close to the metal.

Both.

Hobby: 8 and 16 Work: 32

Hobby: 8-64k Work: Many MB

C, then C++. Code that uses the extremes of C++ object-oriented design can be harder to read.

Yes.

ts?

Yes.

a

N/A

Chris

Reply to
Chris Maryan

What is the best screwdriver: phillips or straight?

Being competent or incompetent is a quality of a person. C/C++ is irrelevant.

Usually BGA, sometimes TQFP.

I use no more memory then needed. Sometimes I have to use less.

Which pen do you prefer: green, black or blue? Why?

Good schematics is a piece of art; bad schematics is a discomfort.

Blocks are for blockheads.

Are there any sympathetic hardware engineers?

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

I thought Python is a species of snake (lol!)

Forth, of course.

Much of what I do in the embedded arena needs certification for Safety. I have a process by which this is fully achievable for Forth and Assembler.

Neither of those two.

Mostly 16-bit but sometimes the 8 or 32 bit variety.

32k to 64k bytes.

Preferably the library code would be in Forth.

Very comfortable (I still do the hardware design as well).

Naturally.

Block schematics are where design outlines start (hardware and software mixed). As I do the hardware and software design (and quite often the vacuum pipework, cryogenic circuits and pneumatic circuits as well), I tend to be the one doing all the explaining.

Your welcome. You can send my prize to......oh, there isn't one. Never mind.

--
********************************************************************
Paul E. Bennett...............
Forth based HIDECS Consultancy
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-510979
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
Reply to
Paul E. Bennett

REXX or C++, except when programming microcontrollers.

My productivity in REXX is about 10x that in any other language, but it runs 100x slower than C/C++. Once I get out of the REXX league, I generally use C++. I have a bunch of useful libraries that I've written over the years.

Reasonably competent in both, though there are many, many C++ styles that are almost distinct languages. I'm most comfortable in the C-plus-classes-plus-templates subset. I generally don't use exceptions or STL.

8 or 32.

All of the above. More often bigger, these days.

C. There are usually a zillion prerequisites for random C++ libraries.

North American ones. I've never had to bother with the opaque European ones.

Sure thing.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

That is a blast from the past! REXX was the native OS/2 scripting language. I didn't know it was still going. Good while it lasted tho.

Are you by any chance the Hobbs of the Hobbs OS/2 archive or is it just a coincidental name collision?

OS/2 was a fabulous operating system deliberately hobbled by an IBM marketing department determined to make it fail to protect their midrange system sales. In the end they lost both and more besides.

Regards, Martin Brown

Reply to
Martin Brown

Yes, I remember doing some scripting back in the 90s with REXX, in OS/2. Nice language, as I recall.

Some old Commodore users remember it too, since it was included in some Amigas. Well, it's still around. Debian Linux packages a REXX interpreter called Regina, for example.

Wasn't it Hobbes? I always assumed it was named after that famous philosopher Thomas Hobbes. Or alternatively, Calvin's tiger...

Reply to
Anssi Saari

That one's easy. Phillips. The screwdriver can't slide out when tightening/loosening the screw.

Reply to
JW

And a green pen is better than a blue one or a black one - it stands out better for commenting on printed documents, and it gives the reader a warm fuzzy feeling that the notes are "green" and friendly.

Some of Tim's questions were vague and you can't give a decent answer without more information. But I think they were interesting nonetheless, and he has got some good answers. You wouldn't pick a library based solely on the language it uses (though you might rule out a contender based on the language). But it is certainly possible to say that the choice of language may be a positive point or a negative point when you are weighing up library choices against each other.

Reply to
David Brown

No, Hobbes the archive is named after Hobbes the philosopher (the law of the jungle character), possibly by way of Hobbes the tiger. I've used Hobbes a lot, though.

I used to be an OS/2 diehard--I still have a triple boot OS2/XP/Red Hat system.

REXX started out on mainframes in about 1985, and is available for Linux and Windows among other things. The best classic REXX interpreter out there is Regina, and there's also the Open Object Rexx interpreter that has all sorts of object-oriented extensions, and now works in 64-bit.

So as long as you can build the executables, REXX should stay around. Really a good language for scripting in--the code is tight and readable.

Cheers

Phil

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Is that pronounced conventionally, or Canadian?

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
Reply to
Tim Williams

Torx or Robertson. They don't cam out and strip the head.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Robertson all the advantage of the phillips plus some :). Robertson screws are widely available in Canada and less so in other places. screwdriver will not slip out even if

formatting link

Walter..

--- news://freenews.netfront.net/ - complaints: snipped-for-privacy@netfront.net ---

Reply to
Walter Banks

I think it's Latin for 'queen', to go with 'rex' for 'king', which would be 'regeena' (hard-G for Virgilians, soft G for everyone else).

Of course 'Rex' is more of a dog name, so maybe 'Regina' should be translated 'Queenie'.

Cheers

Phil

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Sure, but that wasn't listed as an option.

Reply to
JW

The appropriate SED response almost writes itself, so I won't bother. ;)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

I was thinking the same thing.

A friend was at a US trade show and, while setting up the booth, realized that he neglected to bring the required Robertson screwdriver. So he had to wander around the show floor trying to figure out who else was a Canadian company.

Steve

Reply to
steve_schefter

C.

Simpler.

-- Randy Yates % "Bird, on the wing, Digital Signal Labs % goes floating by mailto:// snipped-for-privacy@ieee.org % but there's a teardrop in his eye..."

formatting link
% 'One Summer Dream', *Face The Music*, ELO

Reply to
Randy Yates

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.