A few random (and not necessarily related) observations:

You CAN, sometimes, be more productive in C++ than in Java - especially if
you're using something like the boost libraries.  A lot depends on the
nature of the problem.

At first glance, C++ appears to offer checked exceptions like those of Java,
but the implementation is very different.  C++ exception declarations are a
guaranteed source of trouble, don't use them.

You'll want to use const parameters liberally.  They will go a bit viral,
but that's a Good Thing(tm).

Object allocation in Java is essentially free.  In C++, malloc is expensive.
 If performance is a big consideration then this *will* affect your coding
style.

Compilation speed can get you in C++, especially the cascade of recompiled
dependencies when you change a source file.  Use the pimpl pattern to avoid
pain here.  (also known as a compilation firewall, handle class, or opaque
pointer)

Be aware of how references and auto_ptrs work, they can feel like Java's
garbage-collected references.  But when they behave differently they can
bite you, badly!

Use the RAII pattern.  C++ destructors are fully deterministic, take full
advantage of this.

Be prepared to implement a lot of code yourself.  One of the major
differences between C++ and Java is the open-source ecosystem.  C++ has a
lot of libraries available, but most of them you'll have to pay for.  This
is perhaps the biggest productivity advantage with JVM languages.

If you want static analysis, coverage reports, or continuous integration -
expect to pay a lot of money for the privilege, or to put in a lot of work
implementing the infrastructure yourself.

Finally, enjoy the rapid startup time of your code.  Based purely on this,
begin arguing in forums that statically compiled languages perform much
better than virtual machines.



On 28 September 2010 13:49, Carl Jokl <carl.j...@gmail.com> wrote:

> I know this is the Java posse rather than the C/C++ posse but given
> that I believe a number of you have C/C++ experience I hoped you might
> help me with a question.
>
> This isn't any kind of flame bate or provocation to argument I would
> just appreciate some honest opinion.
>
> I wonder for those who have extensive C/C++ experience how productive
> a highly experience C/C++ developer can be relative to Java.
>
> I have been doing quite a bit of native work recently and have done
> some in the past but am not all that experience relative to the time
> spent with Java and .Net.
>
> I know and understand the concepts of C/C++ but I can't say if feels
> natural yet. I find both Java and C# easier to read and understand.
>
> I do appreciate though that what is easy to read and understand
> depends on what you are used to and levels of experience.
>
> I am curious as to how easy and natural it feels with lots of
> experience. It is easier to ask someone with lots of experience than
> have to try working with it for many years to see how it feels.
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to javapo...@googlegroups.com.
> To unsubscribe from this group, send email to
> javaposse+unsubscr...@googlegroups.com<javaposse%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>


-- 
Kevin Wright

mail / gtalk / msn : kev.lee.wri...@gmail.com
pulse / skype: kev.lee.wright
twitter: @thecoda

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javapo...@googlegroups.com.
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to