140 likes | 152 Views
C++ Panel Discussion Summary. Jim Kowalkowski. Participants. Amber Boehnlein Jim Kowalkowski Leo Michelotti Marc Paterno Liz Sexton-Kennedy Bjarne Stroustrup (distinguished panelist). Day One. Talks Frustration with the language Speed Persistence. Talks.
E N D
C++ Panel Discussion Summary Jim Kowalkowski
Participants Amber Boehnlein Jim Kowalkowski Leo Michelotti Marc Paterno Liz Sexton-Kennedy Bjarne Stroustrup (distinguished panelist)
Day One • Talks • Frustration with the language • Speed • Persistence
Talks • Interesting problems that have been addressed • Abstraction and modularity are key concepts • Experiences with templates and the Standard Library
Frustrations • Questions and concerns • Decomposing problem is difficult to do properly • Requires design time • Slower to produce results • Appropriateness of algorithm/data separation • Answers • Good design yields flexible, maintainable, and correct code • Prototyping is very important, distinguish it from production code • Striking a balance in separating concepts is difficult, extremes are usually bad
Speed • Questions and concerns • Fortran is apparently faster • Answers • Performance testing is difficult, one must compare very similar things • Cannot ignore efficiency when designing and implementing code • Well designed code is generally easier to optimize • Correctness is more important than speed • Extremely fast programs that produce erroneous results, even part of the time, are incorrect
Day Two • Missing features • Use of language
Missing Features • Questions and concerns • Persistency • Reflection • Compiler optimization hints • Answers • Join committee • No consensus (standards require this) • Not pushed hard by groups in the committee
Use of Language Subset • Questions and concerns • Exceptions (cost) • Templates (compiler support) • Answers • Take fresh look at exceptions and templates, much improved compiler support • Turning off exceptions is not using Standard C++ • Missing out on the strengths of C++
C++ is Difficult • Questions and concerns • Abundant Fortran expertise, not so with C++ • Difficult to read C++ • Answers • Fortran skill and code was not very good • Poor C++ is hard to read. Good C++ code matches the concepts and is straightforward to read and maintain • Rely on other code, concentrate on the application, do not need to understand every detail
Use of Standard Library • Questions and concerns • Algorithms are “Weird” • Different style than many are accustomed to • Answers • Missing out on the strengths of C++ • Algorithms allow direct expression of concepts in code • Efficient • Allow many optimization opportunities • Best available algorithms
Session Highlights • First day • Design aspects • Frustrations • Second day • Language features • Language use
Stroustrup’s talk • Majority of talk discussed techniques involving generic programming • Concentrated on use of function objects and algorithms • Classes and code should map clearly and cleanly onto the concepts and intention of the program • Stressed importance of building classes that directly model a single concept. • Stressed that class hierarchies should be kept as simple as possible (hierarchies of pure interface)
Summary • Use the language features that are appropriate for solving the problem • Code to the standard, not a subset • Need for representation on the C++ committee • Take a look at the generic programming aspects of the language. • The combination of OO and generic programming is the strength of the language