Modern programming languages for HEP Modern programming languages for HEP Sebastien Ponce sebastien.ponce@cern.ch CERN Thematic CERN School of Computing 2022 1/65 S.Ponce-CERN
Modern programming languages for HEP 1 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion Modern programming languages for HEP S´ebastien Ponce sebastien.ponce@cern.ch CERN Thematic CERN School of Computing 2022
Modern programming languages for HEP pyOr++UsahleCpp perfC++python Goal of this course Make a tour of latest improvements in HEP programming languages 。C++and python o Understand the use cases of each language the evolution of C++ how this impacts performances o Make a quick tour of python 3 changes 。and help migrating 2/65 S.Ponce-CERN
Modern programming languages for HEP 2 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion Goal of this course Make a tour of latest improvements in HEP programming languages C ++and python Understand the use cases of each language the evolution of C++ how this impacts performances Make a quick tour of python 3 changes and help migrating
Modern programming languages for HEP Outline Why python and C++ Pros and Cons of each language o Respective usecases ②C+getting usable o Language "simplifications" o Making bad code harder to write ③Performant C+ o New performance related features oTemplates o Avoiding virtuality when possible Migrating from Python 2 to python 3 Tour of python 3 changes How to support both versions How to migrate ⑤Conclusion 3/65 S.Ponce-CERN
Modern programming languages for HEP 3 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion Outline 1 Why python and C++ Pros and Cons of each language Respective usecases 2 C ++getting usable Language “simplifications” Making bad code harder to write 3 Performant C++ New performance related features Templates Avoiding virtuality when possible 4 Migrating from Python 2 to python 3 Tour of python 3 changes How to support both versions How to migrate 5 Conclusion
Modern programming languages for HEP 4心,Py0rC十+UsahleCpp perfC+ Why python and C++ ①Why python and C+ Pros and Cons of each language Respective usecases C+fgetting usable Performant C++ Migrating from Python 2 to python 3 Conclusion ProCons UhaeCate 4/65 S.Ponce-CERN
Modern programming languages for HEP 4 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion ProCons UseCase Why python and C++ 1 Why python and C++ Pros and Cons of each language Respective usecases 2 C ++getting usable 3 Performant C++ 4 Migrating from Python 2 to python 3 5 Conclusion
Modern programming languages for HEP 4心PyOrC-十+UsahleCpp perfC+ 花5 Why python and C++ ①Why python and C+ Pros and Cons of each language o Respective usecases C+fgetting usable Performant C++ Migrating from Python 2 to python 3 Conclusion ProCons UaeCate 5/65 S.Ponce-CERN
Modern programming languages for HEP 5 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion ProCons UseCase Why python and C++ 1 Why python and C++ Pros and Cons of each language Respective usecases 2 C ++getting usable 3 Performant C++ 4 Migrating from Python 2 to python 3 5 Conclusion
Modern programming languages for HEP PyOrC++UsahleCpp perfC++python 花5 C++pros and cons Adapted to large projects strongly typed,object oriented o widely used (and taught)with many available libraries ProCons UseCate 6/65 S.Ponce-CERN
Modern programming languages for HEP 6 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion ProCons UseCase C ++pros and cons Adapted to large projects strongly typed, object oriented widely used (and taught) with many available libraries Fast compiled (unlike Java or C#) allows to go close to hardware when needed What we get the most powerful language the most complicated one the most error prone ?
Modern programming languages for HEP 4,PyOrC++UsahteCpp perfC+十ython C++ pros and cons Adapted to large projects strongly typed,object oriented o widely used (and taught)with many available libraries Fast compiled (unlike Java or C#) allows to go close to hardware when needed ProCons UaeCase 6/65 S.Ponce-CERN
Modern programming languages for HEP 6 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion ProCons UseCase C ++pros and cons Adapted to large projects strongly typed, object oriented widely used (and taught) with many available libraries Fast compiled (unlike Java or C#) allows to go close to hardware when needed What we get the most powerful language the most complicated one the most error prone ?
Modern programming languages for HEP PyOrC++UsahleCpp perfC++python C++pros and cons Adapted to large projects strongly typed,object oriented o widely used (and taught)with many available libraries Fast o compiled (unlike Java or C#) allows to go close to hardware when needed What we get o the most powerful language o the most complicated one o the most error prone ProCons UaeCate 6/65 S.Ponce-CERN
Modern programming languages for HEP 6 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion ProCons UseCase C ++pros and cons Adapted to large projects strongly typed, object oriented widely used (and taught) with many available libraries Fast compiled (unlike Java or C#) allows to go close to hardware when needed What we get the most powerful language the most complicated one the most error prone ?
Modern programming languages for HEP python pros and cons Adapted to large projects o multi-paradigm language (object oriented,functional ... o widely used(and taught)with many available libraries ProCons UseCate 7/65 S.Ponce-CERN
Modern programming languages for HEP 7 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion ProCons UseCase python pros and cons Adapted to large projects multi-paradigm language (object oriented, functional ...) widely used (and taught) with many available libraries Easy to use and ubiquitous interpreted, supported on all platforms versatile : usages from ML to web dev or numeric code smooth learning curve, integrated with online tools (SWAN) compatible with C ++, critical code can be written in C ++in the back The price to pay not suitable for performance error prone (no strong typing)
Modern programming languages for HEP python pros and cons Adapted to large projects o multi-paradigm language (object oriented,functional...) o widely used (and taught)with many available libraries Easy to use and ubiquitous ointerpreted,supported on all platforms o versatile:usages from ML to web dev or numeric code o smooth learning curve,integrated with online tools(SWAN) o compatible with C++,critical code can be written in C++in the back ProCons UaeCate 7/65 S.Ponce-CERN
Modern programming languages for HEP 7 / 65 S. Ponce - CERN pyOrC++ UsableCpp perfC++ python3 Conclusion ProCons UseCase python pros and cons Adapted to large projects multi-paradigm language (object oriented, functional ...) widely used (and taught) with many available libraries Easy to use and ubiquitous interpreted, supported on all platforms versatile : usages from ML to web dev or numeric code smooth learning curve, integrated with online tools (SWAN) compatible with C++, critical code can be written in C++in the back The price to pay not suitable for performance error prone (no strong typing)