silicon valley code camp - do you c what i c

30
{ Do you C what I C? The resurgence of C/C++ for modern application development Silicon Valley CodeCamp October 2012 John Thomas, Embarcadero Technologies

Upload: embarcadero-technologies

Post on 18-Nov-2014

665 views

Category:

Technology


0 download

DESCRIPTION

Learn more about C++Builder at http://www.embarcadero.com/products/cbuilder. John Thomas of Embarcadero Technologies presents C++ and its renewed usage in the high-growth mobile application development market with emphasis on the iOS and Android platforms. The presentation covers the brief history of C/C++, its renewed importance in modern application development with current frameworks, new C++11 language features, and vendor language extensions.

TRANSCRIPT

Page 1: Silicon Valley Code Camp - Do you C what I C

{

Do you C what I C?

The resurgence of C/C++ for modern application development

Silicon Valley CodeCampOctober 2012

John Thomas, Embarcadero Technologies

Page 2: Silicon Valley Code Camp - Do you C what I C

2

Dogs and Cats living together…Mass Hysteria!!-Dr. Venkman (Ghostbuster)

Page 3: Silicon Valley Code Camp - Do you C what I C

3

Dogs (like C++) require some effort, but it pays off in more utility, later.

Page 4: Silicon Valley Code Camp - Do you C what I C

{

A Brief History of C++

Page 5: Silicon Valley Code Camp - Do you C what I C

5

Bell Labs

Page 6: Silicon Valley Code Camp - Do you C what I C

6

Bjarne Stroustrup

C with Objects (1979)

Modeled OO after Simula and Ada

But syntax and RTL based on C

Classes Inheritance Inlining Default arguments

Type checking CFront compiler

Page 7: Silicon Valley Code Camp - Do you C what I C

7

Name changed to C++ in 1983 Virtual functions Operator overloading References Constants // Single line comments

AT&T commercial compiler

AT&T C++

Page 8: Silicon Valley Code Camp - Do you C what I C

8

Page 9: Silicon Valley Code Camp - Do you C what I C

9

Windows C++ Frameworks

Page 10: Silicon Valley Code Camp - Do you C what I C

10

Standardization (ANSI/ISO)

1998 2003 2007 TR1 2011

Page 11: Silicon Valley Code Camp - Do you C what I C

11

C++ 98

Language Multiple

Inheritance Templates Abstract Classes Exceptions Namespace Typecasts bool

Library Strings Streams Algorithms Containers Iterators

Page 12: Silicon Valley Code Camp - Do you C what I C

12

C++03 & TR1

C++03 was a bug fix release for implementers

No change to the specification

TR1 was library focused

Much of the standard library began its life in Boost

Regular expressions Smart pointers Hash tables Random number

generators Reference wrapper Function objects Tuple type Fixed size array

Page 13: Silicon Valley Code Camp - Do you C what I C

13

C++11

Rvalue references and move constructors

constexpr - Generalized constant expressions

Core language usability enhancements

Initializer lists Uniform initialization Type inference Range-based for-loop Lambda functions and expressions Alternative function syntax Object construction improvement Explicit overrides and final Null pointer constant Strongly typed enumerations Right angle bracket Explicit conversion operators Alias templates Unrestricted unions

Variadic templates New string literals User-defined literals Multithreading memory model Thread-local storage Explicitly defaulted and deleted

special member functions Type long long int Static assertions Allow sizeof to work on members

of classes without an explicit object

Control and query object alignment

Allow garbage collected implementations

Threading facilities Tuple types Hash tables Regular expressions General-purpose smart pointers Extensible random number facility Wrapper reference Polymorphic wrappers for

function objects Type traits for metaprogramming

Page 14: Silicon Valley Code Camp - Do you C what I C

{

A Vendor Perspective

Application frameworks for design time development

Page 15: Silicon Valley Code Camp - Do you C what I C

15

Application Frameworks

C++ (OWL) Windows

Encapsulation Inheritance

Multiple-Inheritance

v-tables Fields Pure-code

generation

Delphi/C++ (VCL) Windows

Encapsulation Delegation Method Pointers

(closures) Properties Text file form Streaming-system RTTI

Page 16: Silicon Valley Code Camp - Do you C what I C

16

Design Time

Page 17: Silicon Valley Code Camp - Do you C what I C

17

RTTI

C++Builder __classid __delphirtti __closure __property __published

WinRT C++ ref/value/interface property Eevent delegate generic ref new ^ %

Page 18: Silicon Valley Code Camp - Do you C what I C

{

A Market Perspective

Rise and fall and rise again of C++

Page 19: Silicon Valley Code Camp - Do you C what I C

19

C++ Usage Statistics

Page 20: Silicon Valley Code Camp - Do you C what I C

20

1995 2000 2005 20100

500,000

1,000,000

1,500,000

2,000,000

2,500,000

3,000,000

3,500,000

C/C++JavaC#.Net

Changes in Enterprise

Page 21: Silicon Valley Code Camp - Do you C what I C

21

Client / Server

1990s Large growth in

desktop applications Client-server IP

architecture nascent Most server side apps

were basic web 2000

Server side development increase

Java growth with EJB

2005 Device development

kick-started again by Apple success with iPod, iPhone, and iPad

2010 Tremendous device

client growth through smartphones driven by Android

Server side still important but leveraged

Page 22: Silicon Valley Code Camp - Do you C what I C

{

It’s all about the Client

Again…

Page 23: Silicon Valley Code Camp - Do you C what I C

23

Devices, Devices, Devices

Page 24: Silicon Valley Code Camp - Do you C what I C

24

Windows 8 WinRT

Page 25: Silicon Valley Code Camp - Do you C what I C

25

BlackBerry 10

Page 26: Silicon Valley Code Camp - Do you C what I C

26

Android NDK

Page 27: Silicon Valley Code Camp - Do you C what I C

27

iOS

Objective-C C-based OO

language modeled after SmallTalk

Now shares a common front-end and architecture with a major C++ compiler CLANG

Page 28: Silicon Valley Code Camp - Do you C what I C

28

A common use case

C++ Source Code

iOS AndroidBlackBer

ry

Page 29: Silicon Valley Code Camp - Do you C what I C

29

C++ is coming up on its 30th anniversary

It’s more important than ever

Device growth and vendor support favor C++

Summary