SlideShare une entreprise Scribd logo
1  sur  158
Télécharger pour lire hors ligne
D Programming
                            .
Jonathan MERCIER

Introduction
                                        D Programming
Object
                            .               In nutshell
Functional
Meta-programming
Parallelism
Ressource Management
Contract                                Jonathan MERCIER
System and Safe Code
Reference and pointer
Generics
Inference
Loops
Functions                                December 9, 2012
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .                       1/122
                                                  .




Let start it!
                        D Programming                       .
                                                            .   .   .


                                                                        Forward
                                                                         .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                        .    .

                                                         2/122
                                                           .




Let start it!
                            D Programming                        .   .   .   .




                                                                                 Back
                                                                                 .


                                                                                        .
                                                                                        .   .   .


                                                                                                    Forward
                                                                                                     .




GTK D
D Programming

Jonathan MERCIER
                        Before starting
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract
System and Safe Code
Reference and pointer
Generics
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .

                                          3/122
                                            .




Let start it!
                        D Programming             .   .   .   .




                                                                  Back
                                                                  .


                                                                         .
                                                                         .   .   .


                                                                                     Forward
                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        Why a new language?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management            .
Contract                        Few significant dates
System and Safe Code            .
Reference and pointer               C++ 1983
Generics
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program               .
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .

                                                       4/122
                                                         .




Let start it!
                        D Programming                          .   .   .   .




                                                                               Back
                                                                               .


                                                                                      .
                                                                                      .   .   .


                                                                                                  Forward
                                                                                                   .




GTK D
D Programming

Jonathan MERCIER
                        Why a new language?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management            .
Contract                        Few significant dates
System and Safe Code            .
Reference and pointer               C++ 1983
Generics
Inference
Loops
                                    Java 1990
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program               .
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .

                                                       4/122
                                                         .




Let start it!
                        D Programming                          .   .   .   .




                                                                               Back
                                                                               .


                                                                                      .
                                                                                      .   .   .


                                                                                                  Forward
                                                                                                   .




GTK D
D Programming

Jonathan MERCIER
                        Why a new language?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management            .
Contract                        Few significant dates
System and Safe Code            .
Reference and pointer               C++ 1983
Generics
Inference
Loops
                                    Java 1990
Functions
Debugs
                                    Python 1995
Versions
Requirement
Editors

Basics
My first D program               .
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .

                                                       4/122
                                                         .




Let start it!
                        D Programming                          .   .   .   .




                                                                               Back
                                                                               .


                                                                                      .
                                                                                      .   .   .


                                                                                                  Forward
                                                                                                   .




GTK D
D Programming

Jonathan MERCIER
                        Why a new language?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management            .
Contract                        Few significant dates
System and Safe Code            .
Reference and pointer               C++ 1983
Generics
Inference
Loops
                                    Java 1990
Functions
Debugs
                                    Python 1995
Versions
Requirement                         Ruby 1995
Editors

Basics
My first D program               .
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .

                                                       4/122
                                                         .




Let start it!
                        D Programming                          .   .   .   .




                                                                               Back
                                                                               .


                                                                                      .
                                                                                      .   .   .


                                                                                                  Forward
                                                                                                   .




GTK D
D Programming

Jonathan MERCIER
                        Why a new language?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management            .
Contract                        Few significant dates
System and Safe Code            .
Reference and pointer               C++ 1983
Generics
Inference
Loops
                                    Java 1990
Functions
Debugs
                                    Python 1995
Versions
Requirement                         Ruby 1995

                                    And now?
Editors

Basics
My first D program               .
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .

                                                       4/122
                                                         .




Let start it!
                        D Programming                          .   .   .   .




                                                                               Back
                                                                               .


                                                                                      .
                                                                                      .   .   .


                                                                                                  Forward
                                                                                                   .




GTK D
D Programming

Jonathan MERCIER
                        What is D programming?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract
System and Safe Code
                            D is a modern language programming inspired by:
Reference and pointer
Generics
                                    C++
Inference
Loops                               Java
Functions
Debugs                              Haskell
Versions
Requirement                         Python
Editors

Basics                              Ruby
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .

                                                    5/122
                                                      .




Let start it!
                        D Programming                              .   .   .   .




                                                                                   Back
                                                                                   .


                                                                                          .
                                                                                          .   .   .


                                                                                                      Forward
                                                                                                       .




GTK D
D Programming

Jonathan MERCIER
                        Why a new language?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract
System and Safe Code        .
Reference and pointer       D Combines
Generics                    .
Inference                      Modeling Power
Loops
Functions
Debugs
Versions


                            .
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .
                            .   .

                                                6/122
                                                  .




Let start it!
                        D Programming                   .   .   .   .




                                                                        Back
                                                                        .


                                                                               .
                                                                               .   .   .


                                                                                           Forward
                                                                                            .




GTK D
D Programming

Jonathan MERCIER
                        Why a new language?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract
System and Safe Code        .
Reference and pointer       D Combines
Generics                    .
Inference                      Modeling Power
Loops
Functions
Debugs
                                    Modern Convenience
Versions


                            .
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .
                            .   .

                                                         6/122
                                                           .




Let start it!
                        D Programming                            .   .   .   .




                                                                                 Back
                                                                                 .


                                                                                        .
                                                                                        .   .   .


                                                                                                    Forward
                                                                                                     .




GTK D
D Programming

Jonathan MERCIER
                        Why a new language?
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract
System and Safe Code        .
Reference and pointer       D Combines
Generics                    .
Inference                      Modeling Power
Loops
Functions
Debugs
                                    Modern Convenience
Versions
                                    Native Efficiency
                            .
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .
                            .   .

                                                         6/122
                                                           .




Let start it!
                        D Programming                            .   .   .   .




                                                                                 Back
                                                                                 .


                                                                                        .
                                                                                        .   .   .


                                                                                                    Forward
                                                                                                     .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   .

                                                         7/122
                                                           .




Let start it!
                        D Programming                            .   .   .   .




                                                                                 Back
                                                                                 .


                                                                                        .
                                                                                        .   .   .


                                                                                                    Forward
                                                                                                     .




GTK D
D Programming

Jonathan MERCIER
                        Object
Introduction
Object
Functional
Meta-programming            .
Parallelism
Ressource Management
                                        Interface
Contract                                    1 interface foo { …}
System and Safe Code                    .
Reference and pointer
Generics
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters       .
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .

                                                                   8/122
                                                                     .




Let start it!
                        D Programming                                      .   .   .   .




                                                                                           Back
                                                                                           .


                                                                                                  .
                                                                                                  .   .   .


                                                                                                              Forward
                                                                                                               .




GTK D
D Programming

Jonathan MERCIER
                        Object
Introduction
Object
Functional
Meta-programming            .
Parallelism
Ressource Management
                                        Interface
Contract                                    1 interface foo { …}
System and Safe Code                    .
Reference and pointer
Generics                                class
Inference
Loops
                                            1 class bar { …}
Functions                               .
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters       .
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .

                                                                   8/122
                                                                     .




Let start it!
                        D Programming                                      .   .   .   .




                                                                                           Back
                                                                                           .


                                                                                                  .
                                                                                                  .   .   .


                                                                                                              Forward
                                                                                                               .




GTK D
D Programming

Jonathan MERCIER
                        Object
Introduction
Object
Functional
Meta-programming            .
Parallelism
Ressource Management
                                        Interface
Contract                                    1 interface foo { …}
System and Safe Code                    .
Reference and pointer
Generics                                class
Inference
Loops
                                            1 class bar { …}
Functions                               .
Debugs
Versions                                inheritance
Requirement
                                            1 class bar: foo { …}
Editors
                                        .
Basics
My first D program
Types
Arrays
String and characters       .
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .

                                                                    8/122
                                                                      .




Let start it!
                        D Programming                                       .   .   .   .




                                                                                            Back
                                                                                            .


                                                                                                   .
                                                                                                   .   .   .


                                                                                                               Forward
                                                                                                                .




GTK D
D Programming

Jonathan MERCIER
                        Object
Introduction
Object
Functional
Meta-programming            .
Parallelism
Ressource Management
                                        Interface
Contract                                    1 interface foo { …}
System and Safe Code                    .
Reference and pointer
Generics                                class
Inference
Loops
                                            1 class bar { …}
Functions                               .
Debugs
Versions                                inheritance
Requirement
                                            1 class bar: foo { …}
Editors
                                        .
Basics
My first D program                       multi class inheritance not allowed, instead used
Types
Arrays                                  interface.
String and characters       .
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .

                                                                    8/122
                                                                      .




Let start it!
                        D Programming                                        .   .   .   .




                                                                                             Back
                                                                                             .


                                                                                                    .
                                                                                                    .   .   .


                                                                                                                Forward
                                                                                                                 .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   .

                                                         9/122
                                                           .




Let start it!
                        D Programming                            .   .   .   .




                                                                                 Back
                                                                                 .


                                                                                        .
                                                                                        .   .   .


                                                                                                    Forward
                                                                                                     .




GTK D
D Programming

Jonathan MERCIER
                        Functional
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
                            .
Contract                                Data immutability
System and Safe Code
Reference and pointer
                                            1 immutable int[] a = [ 4, 6, 1, 2];
Generics                                .
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
                            .
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .

                                                                          10/122
                                                                             .




Let start it!
                        D Programming                                              .   .   .   .




                                                                                                   Back
                                                                                                   .


                                                                                                          .
                                                                                                          .   .   .


                                                                                                                      Forward
                                                                                                                       .




GTK D
D Programming

Jonathan MERCIER
                        Functional
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
                            .
Contract                                Data immutability
System and Safe Code
Reference and pointer
                                            1 immutable int[] a = [ 4, 6, 1, 2];
Generics                                .
Inference
Loops                                   Pure functions
Functions
                                            1 pure int square(int x) { return x * x; }
Debugs
Versions
                                        .
Requirement
Editors

Basics
My first D program
Types
                            .
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .

                                                                          10/122
                                                                             .




Let start it!
                        D Programming                                                    .   .   .   .




                                                                                                         Back
                                                                                                         .


                                                                                                                .
                                                                                                                .   .   .


                                                                                                                            Forward
                                                                                                                             .




GTK D
D Programming

Jonathan MERCIER
                        Functional
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
                            .
Contract                                Data immutability
System and Safe Code
Reference and pointer
                                            1 immutable int[] a = [ 4, 6, 1, 2];
Generics                                .
Inference
Loops                                   Pure functions
Functions
                                            1 pure int square(int x) { return x * x; }
Debugs
Versions
                                        .
Requirement
Editors                                 Lambda functions
                                            1 a.sort!( (x,y) => x < y ); // [ 1, 2, 4, 6 ]
Basics
                                        .
My first D program
Types
                            .
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .

                                                                          10/122
                                                                             .




Let start it!
                        D Programming                                                        .   .   .   .




                                                                                                             Back
                                                                                                             .


                                                                                                                    .
                                                                                                                    .   .   .


                                                                                                                                Forward
                                                                                                                                 .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   .   .

                                                         11/122
                                                            .




Let start it!
                        D Programming                             .   .   .   .




                                                                                  Back
                                                                                  .


                                                                                         .
                                                                                         .   .   .


                                                                                                     Forward
                                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        Meta-programming
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract                    .
System and Safe Code        Combination of
Reference and pointer       .
Generics                       templates
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
                            .
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .

                                             12/122
                                                .




Let start it!
                        D Programming                 .   .   .   .




                                                                      Back
                                                                      .


                                                                             .
                                                                             .   .   .


                                                                                         Forward
                                                                                          .




GTK D
D Programming

Jonathan MERCIER
                        Meta-programming
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract                    .
System and Safe Code        Combination of
Reference and pointer       .
Generics                       templates
Inference
Loops
Functions
                                        compile time function execution
Debugs
Versions
Requirement
Editors

Basics
                            .
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .

                                                            12/122
                                                               .




Let start it!
                        D Programming                                     .   .   .   .




                                                                                          Back
                                                                                          .


                                                                                                 .
                                                                                                 .   .   .


                                                                                                             Forward
                                                                                                              .




GTK D
D Programming

Jonathan MERCIER
                        Meta-programming
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract                    .
System and Safe Code        Combination of
Reference and pointer       .
Generics                       templates
Inference
Loops
Functions
                                        compile time function execution
Debugs
Versions
                                        tuples
Requirement
Editors

Basics
                            .
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .

                                                            12/122
                                                               .




Let start it!
                        D Programming                                     .   .   .   .




                                                                                          Back
                                                                                          .


                                                                                                 .
                                                                                                 .   .   .


                                                                                                             Forward
                                                                                                              .




GTK D
D Programming

Jonathan MERCIER
                        Meta-programming
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract                    .
System and Safe Code        Combination of
Reference and pointer       .
Generics                       templates
Inference
Loops
Functions
                                        compile time function execution
Debugs
Versions
                                        tuples
Requirement
Editors                                 string mixins
Basics
                            .
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .

                                                            12/122
                                                               .




Let start it!
                        D Programming                                     .   .   .   .




                                                                                          Back
                                                                                          .


                                                                                                 .
                                                                                                 .   .   .


                                                                                                             Forward
                                                                                                              .




GTK D
D Programming

Jonathan MERCIER
                        Meta-programming
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract
System and Safe Code
Reference and pointer                                   Code 1: Example
Generics
                                1 template Factorial(ulong n){
Inference                       2   static if(n < 2)
Loops                           3     const Factorial = 1;
Functions                       4   else
Debugs                          5     const Factorial = n * Factorial!(n − 1);
Versions                        6 }
Requirement                     7 const ulong var = Factorial!( 8 ); // compute at compile−time
Editors                     .
Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .

                                                                  13/122
                                                                     .




Let start it!
                        D Programming                                                    .   .   .   .




                                                                                                         Back
                                                                                                         .


                                                                                                                .
                                                                                                                .   .   .


                                                                                                                            Forward
                                                                                                                             .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   .   .

                                                         14/122
                                                            .




Let start it!
                        D Programming                             .   .   .   .




                                                                                  Back
                                                                                  .


                                                                                         .
                                                                                         .   .   .


                                                                                                     Forward
                                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        Parallelism
Introduction
Object
Functional
Meta-programming            .
Parallelism
Ressource Management
                                     module to use
Contract                                 1 import std.parallelism;
System and Safe Code                 .
Reference and pointer
Generics
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters       .
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   ..   .

                                                                     15/122
                                                                        .




Let start it!
                        D Programming                                         .   .   .   .




                                                                                              Back
                                                                                              .


                                                                                                     .
                                                                                                     .   .   .


                                                                                                                 Forward
                                                                                                                  .




GTK D
D Programming

Jonathan MERCIER
                        Parallelism
Introduction
Object
Functional
Meta-programming            .
Parallelism
Ressource Management
                                     module to use
Contract                                 1 import std.parallelism;
System and Safe Code                 .
Reference and pointer
Generics                             parallel loop
Inference
Loops                                    1 foreach( i; parallel( list ) ){ …}
Functions                            .
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters       .
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   ..   .

                                                                       15/122
                                                                          .




Let start it!
                        D Programming                                           .   .   .   .




                                                                                                Back
                                                                                                .


                                                                                                       .
                                                                                                       .   .   .


                                                                                                                   Forward
                                                                                                                    .




GTK D
D Programming

Jonathan MERCIER
                        Parallelism
Introduction
Object
Functional
Meta-programming            .
Parallelism
Ressource Management
                                     module to use
Contract                                 1 import std.parallelism;
System and Safe Code                 .
Reference and pointer
Generics                             parallel loop
Inference
Loops                                    1 foreach( i; parallel( list ) ){ …}
Functions                            .
Debugs
Versions
Requirement
                                     Pool thread
Editors
                                         1   void myfunction( int param1, int param 2 ){ …}
                                         2   auto myTask = task!myfunction( param1, param2 );
Basics                                   3   taskPool.put( myTask );
My first D program                        4   doSomething();       // another work in parallel
Types                                    5   taskPool.finish( true ); // wait alls jobs ending
Arrays                               .
String and characters       .
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   ..   .

                                                                       15/122
                                                                          .




Let start it!
                        D Programming                                                      .   .   .   .




                                                                                                           Back
                                                                                                           .


                                                                                                                  .
                                                                                                                  .   .   .


                                                                                                                              Forward
                                                                                                                               .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .
                                 .   .   .

                                                         16/122
                                                            .




Let start it!
                        D Programming                             .   .   .   .




                                                                                  Back
                                                                                  .


                                                                                         .
                                                                                         .   .   .


                                                                                                     Forward
                                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        Ressource Management
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract
System and Safe Code
Reference and pointer                                             Code 2: Example
Generics
Inference
                                1               File f = File( ”myfile.txt”, ”r”);
Loops
                                2               scope(exit) f.close();
                                3               lockFile( f );
Functions
                                4               doFoo( f );
Debugs
                                5               scope(success) doBar( f );
Versions
                                6               scope(failure) unlock( f );
Requirement
Editors
                            .
Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .       .   .   .   .

                                                                             17/122
                                                                                .




Let start it!
                        D Programming                                                 .   .   .   .




                                                                                                      Back
                                                                                                      .


                                                                                                             .
                                                                                                             .   .   .


                                                                                                                         Forward
                                                                                                                          .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   .   .   .

                                                         18/122
                                                            .




Let start it!
                        D Programming                             .   .   .   .




                                                                                  Back
                                                                                  .


                                                                                         .
                                                                                         .   .   .


                                                                                                     Forward
                                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        Contract
Introduction
Object                      .
Functional                              check a statement
Meta-programming
                                            1 assert( var != null );
Parallelism
Ressource Management
                                        .
Contract
System and Safe Code
Reference and pointer
Generics
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
                            .
Template
Miscellanous
                        .
                        .
                            .   .   .   .    .

                                                                       19/122
                                                                          .




Let start it!
                        D Programming                                           .   .   .   .




                                                                                                Back
                                                                                                .


                                                                                                       .
                                                                                                       .   .   .


                                                                                                                   Forward
                                                                                                                    .




GTK D
D Programming

Jonathan MERCIER
                        Contract
Introduction
Object                      .
Functional                              check a statement
Meta-programming
                                            1 assert( var != null );
Parallelism
Ressource Management
                                        .
Contract
System and Safe Code                    check before entering into a function
Reference and pointer
                                            1 double foo ( int a )
Generics
                                            2 in{ assert( a > 0 ); }
Inference
                                            3 body { return a − 2; }
Loops
Functions
                                        .
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
                            .
Template
Miscellanous
                        .
                        .
                            .   .   .   .    .

                                                                       19/122
                                                                          .




Let start it!
                        D Programming                                           .   .   .   .




                                                                                                Back
                                                                                                .


                                                                                                       .
                                                                                                       .   .   .


                                                                                                                   Forward
                                                                                                                    .




GTK D
D Programming

Jonathan MERCIER
                        Contract
Introduction
Object                      .
Functional                              check a statement
Meta-programming
                                            1 assert( var != null );
Parallelism
Ressource Management
                                        .
Contract
System and Safe Code                    check before entering into a function
Reference and pointer
                                            1 double foo ( int a )
Generics
                                            2 in{ assert( a > 0 ); }
Inference
                                            3 body { return a − 2; }
Loops
Functions
                                        .
Debugs
Versions                                check at function exit
Requirement                                 1 int foo ( int a )
Editors                                     2 out{ assert( a > 0 ); }
                                            3 body { return a − 2; }
Basics
My first D program
                                        .
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
                            .
Template
Miscellanous
                        .
                        .
                            .   .   .   .    .

                                                                        19/122
                                                                           .




Let start it!
                        D Programming                                            .   .   .   .




                                                                                                 Back
                                                                                                 .


                                                                                                        .
                                                                                                        .   .   .


                                                                                                                    Forward
                                                                                                                     .




GTK D
D Programming

Jonathan MERCIER
                        Contract
Introduction
Object                      .
Functional                              check a statement
Meta-programming
                                            1 assert( var != null );
Parallelism
Ressource Management
                                        .
Contract
System and Safe Code                    check before entering into a function
Reference and pointer
                                            1 double foo ( int a )
Generics
                                            2 in{ assert( a > 0 ); }
Inference
                                            3 body { return a − 2; }
Loops
Functions
                                        .
Debugs
Versions                                check at function exit
Requirement                                 1 int foo ( int a )
Editors                                     2 out{ assert( a > 0 ); }
                                            3 body { return a − 2; }
Basics
My first D program
                                        .
                                        -release flag will not compute contract
Types
Arrays
String and characters
Const and Immutable                         $ ldc2 -release foo.d
Input/Output
                                        .
Algorithm
Structure and Class
                            .
Template
Miscellanous
                        .
                        .
                            .   .   .   .    .

                                                                        19/122
                                                                           .




Let start it!
                        D Programming                                            .   .   .   .




                                                                                                 Back
                                                                                                 .


                                                                                                        .
                                                                                                        .   .   .


                                                                                                                    Forward
                                                                                                                     .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   .   .   .

                                                         20/122
                                                            .




Let start it!
                        D Programming                             .   .   .   .




                                                                                  Back
                                                                                  .


                                                                                         .
                                                                                         .   .   .


                                                                                                     Forward
                                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        System and Safe Code
Introduction
Object
Functional                  .
Meta-programming
                            System and Safe Code
Parallelism
                            .
Ressource Management
Contract
                            Safe functions are functions that are statically checked
System and Safe Code
Reference and pointer
                            to have no possibility of undefined behavior.
Generics
Inference
Loops
Functions
Debugs                      Undefined behavior is often used as a vector for
Versions
Requirement                 malicious attacks.
Editors

Basics
My first D program
Types
Arrays                      Func­tions are marked with at­tributes: @safe,
String and characters
Const and Immutable
                            @system, @trusted
                            .
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .   .   .

                                                      21/122
                                                         .




Let start it!
                        D Programming                                 .   .   .   .




                                                                                      Back
                                                                                      .


                                                                                             .
                                                                                             .   .   .


                                                                                                         Forward
                                                                                                          .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   .   .   .   .

                                                         22/122
                                                            .




Let start it!
                        D Programming                             .   .   .   .




                                                                                  Back
                                                                                  .


                                                                                         .
                                                                                         .   .   .


                                                                                                     Forward
                                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        Reference and pointer
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
                            .
Contract                            Pointers exist only to create C interface code
System and Safe Code
                                            1 int* a = cFunction( param );
Reference and pointer
Generics
                                    .
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
                            .
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .    .   .

                                                                       23/122
                                                                          .




Let start it!
                        D Programming                                           .   .   .   .




                                                                                                Back
                                                                                                .


                                                                                                       .
                                                                                                       .   .   .


                                                                                                                   Forward
                                                                                                                    .




GTK D
D Programming

Jonathan MERCIER
                        Reference and pointer
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
                            .
Contract                            Pointers exist only to create C interface code
System and Safe Code
                                            1 int* a = cFunction( param );
Reference and pointer
Generics
                                    .
Inference
Loops                               ref into function
Functions
                                            1 void foo( ref int[] param ) { …}
Debugs
Versions
                                    .
Requirement
Editors

Basics
My first D program
Types
                            .
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .    .   .

                                                                         23/122
                                                                            .




Let start it!
                        D Programming                                             .   .   .   .




                                                                                                  Back
                                                                                                  .


                                                                                                         .
                                                                                                         .   .   .


                                                                                                                     Forward
                                                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        Reference and pointer
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
                            .
Contract                            Pointers exist only to create C interface code
System and Safe Code
                                            1 int* a = cFunction( param );
Reference and pointer
Generics
                                    .
Inference
Loops                               ref into function
Functions
                                            1 void foo( ref int[] param ) { …}
Debugs
Versions
                                    .
Requirement
Editors
                                    ref into a loop
Basics                                      1 foreach( ref item ; list ){ …}
                                    .
My first D program
Types
                            .
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .    .   .

                                                                          23/122
                                                                               .




Let start it!
                        D Programming                                              .   .   .   .




                                                                                                   Back
                                                                                                   .


                                                                                                          .
                                                                                                          .   .   .


                                                                                                                      Forward
                                                                                                                       .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   . .   .   .

                                                         24/122
                                                            .




Let start it!
                        D Programming                             .   .   .   .




                                                                                  Back
                                                                                  .


                                                                                         .
                                                                                         .   .   .


                                                                                                     Forward
                                                                                                      .




GTK D
D Programming

Jonathan MERCIER            .
                            Generic
Introduction
                            .
Object
                               class
Functional                               1 class Foo( T ){ …}
Meta-programming                         2 Foo!int instance = new Foo!(int)( param );
Parallelism                         .
Ressource Management
Contract
System and Safe Code
Reference and pointer
Generics
Inference
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
                            .
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   ..    .   .

                                                                    25/122
                                                                       .




Let start it!
                        D Programming                                                   .   .   .   .




                                                                                                        Back
                                                                                                        .


                                                                                                               .
                                                                                                               .   .   .


                                                                                                                           Forward
                                                                                                                            .




GTK D
D Programming

Jonathan MERCIER            .
                            Generic
Introduction
                            .
Object
                               class
Functional                               1 class Foo( T ){ …}
Meta-programming                         2 Foo!int instance = new Foo!(int)( param );
Parallelism                         .
Ressource Management
Contract
System and Safe Code
                                    structure
Reference and pointer                    1 struct Foo( T ){ …}
Generics
                                         2 Foo!int instance = Foo!int( param );
Inference                           .
Loops
Functions
Debugs
Versions
Requirement
Editors

Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
                            .
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   ..    .   .

                                                                     25/122
                                                                        .




Let start it!
                        D Programming                                                   .   .   .   .




                                                                                                        Back
                                                                                                        .


                                                                                                               .
                                                                                                               .   .   .


                                                                                                                           Forward
                                                                                                                            .




GTK D
D Programming

Jonathan MERCIER            .
                            Generic
Introduction
                            .
Object
                               class
Functional                               1 class Foo( T ){ …}
Meta-programming                         2 Foo!int instance = new Foo!(int)( param );
Parallelism                         .
Ressource Management
Contract
System and Safe Code
                                    structure
Reference and pointer                    1 struct Foo( T ){ …}
Generics
                                         2 Foo!int instance = Foo!int( param );
Inference                           .
Loops
Functions                           function
Debugs
                                         1 T foo( T )(T param){ …}
Versions
                                         2 int var = foo!int( param );
Requirement
Editors
                                    .
Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
                            .
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   ..    .   .

                                                                     25/122
                                                                         .




Let start it!
                        D Programming                                                   .   .   .   .




                                                                                                        Back
                                                                                                        .


                                                                                                               .
                                                                                                               .   .   .


                                                                                                                           Forward
                                                                                                                            .




GTK D
D Programming

Jonathan MERCIER            .
                            Generic
Introduction
                            .
Object
                               class
Functional                               1 class Foo( T ){ …}
Meta-programming                         2 Foo!int instance = new Foo!(int)( param );
Parallelism                         .
Ressource Management
Contract
System and Safe Code
                                    structure
Reference and pointer                    1 struct Foo( T ){ …}
Generics
                                         2 Foo!int instance = Foo!int( param );
Inference                           .
Loops
Functions                           function
Debugs
                                         1 T foo( T )(T param){ …}
Versions
                                         2 int var = foo!int( param );
Requirement
Editors
                                    .
Basics                              macro
My first D program
                                         1 template TFoo( T )( T param ){ immutable T f = param + 3;
Types
                                                 }
Arrays
                                         2 int a = TFoo!int( 4 ) ; // return 7 at compile time
String and characters
                                    .
Const and Immutable
Input/Output
                            .
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   ..    .   .

                                                                     25/122
                                                                         .




Let start it!
                        D Programming                                                   .   .   .   .




                                                                                                        Back
                                                                                                        .


                                                                                                               .
                                                                                                               .   .   .


                                                                                                                           Forward
                                                                                                                            .




GTK D
D Programming

Jonathan MERCIER
                        Plan
                            ..
                            1  Introduction
Introduction                     Object
Object                           Functional
Functional                       Meta-programming
Meta-programming
                                 Parallelism
Parallelism
                                 Ressource Management
Ressource Management
                                 Contract
                                 System and Safe Code
Contract
                                 Reference and pointer
System and Safe Code
                                 Generics
Reference and pointer
                                 Inference
Generics
                                 Loops
Inference
                                 Functions
Loops                            Debugs
Functions                        Versions
Debugs                           Requirement
Versions                         Editors
Requirement                  .
                            2 Basics
Editors                          My first D program
                                 Types
Basics                           Arrays
My first D program                String and characters
Types                            Const and Immutable
Arrays                           Input/Output
String and characters            Algorithm
Const and Immutable              Structure and Class
Input/Output                     Template
Algorithm                        Miscellanous
Structure and Class
                                 Let start it!
                             .
                            3 GTK D
Template
                             .
                            4 Thanks To
Miscellanous
                        .
                        .
                             .   .   ..   .   .   .

                                                         26/122
                                                            .




Let start it!
                        D Programming                             .   .   .   .




                                                                                  Back
                                                                                  .


                                                                                         .
                                                                                         .   .   .


                                                                                                     Forward
                                                                                                      .




GTK D
D Programming

Jonathan MERCIER
                        Inference
Introduction
Object
Functional
Meta-programming
Parallelism
Ressource Management
Contract                    .
System and Safe Code
Reference and pointer
                                    auto for variable
Generics                                    1 size_t[] list = [ 0, 1, 2, 3, 4];
Inference                                   2 auto item = list[1]; // item type is size_t
Loops                               .
Functions
Debugs
Versions
Requirement
Editors
                            .
Basics
My first D program
Types
Arrays
String and characters
Const and Immutable
Input/Output
Algorithm
Structure and Class
Template
Miscellanous
                        .
                        .
                            .   .   .   .    .   .   .

                                                                         27/122
                                                                            .




Let start it!
                        D Programming                                                       .   .   .   .




                                                                                                            Back
                                                                                                            .


                                                                                                                   .
                                                                                                                   .   .   .


                                                                                                                               Forward
                                                                                                                                .




GTK D
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming
Fudcon D programming

Contenu connexe

Tendances

06 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_0806 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_08Niit Care
 
13 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_1913 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_19Niit Care
 
Annotating with Annotations - ForumPHP 2012
Annotating with Annotations - ForumPHP 2012Annotating with Annotations - ForumPHP 2012
Annotating with Annotations - ForumPHP 2012Rafael Dohms
 
Annotating with Annotations - DPC UnCon
Annotating with Annotations - DPC UnConAnnotating with Annotations - DPC UnCon
Annotating with Annotations - DPC UnConRafael Dohms
 
Flevy.com - Business Process Master List (BPML) Template
Flevy.com - Business Process Master List (BPML) TemplateFlevy.com - Business Process Master List (BPML) Template
Flevy.com - Business Process Master List (BPML) TemplateDavid Tracy
 
Consistent Modeling Technique for Accurate Transaction Level Models
Consistent Modeling Technique for Accurate Transaction Level ModelsConsistent Modeling Technique for Accurate Transaction Level Models
Consistent Modeling Technique for Accurate Transaction Level Modelshuichenphd
 
Uni liverpool
Uni liverpoolUni liverpool
Uni liverpoolN/A
 
Real world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageReal world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageMario Fusco
 
Patchwork3 D Modules January 2009
Patchwork3 D Modules January 2009Patchwork3 D Modules January 2009
Patchwork3 D Modules January 2009CAM3DRT
 
Incremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIncremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIstvan Rath
 
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Shinpei Hayashi
 
On self-reproducing computer programs
On self-reproducing computer programsOn self-reproducing computer programs
On self-reproducing computer programsnamblasec
 
ConsScale: A Cognitive Scale Inspired on Consciousness
ConsScale: A Cognitive Scale Inspired on ConsciousnessConsScale: A Cognitive Scale Inspired on Consciousness
ConsScale: A Cognitive Scale Inspired on ConsciousnessAccenture Analytics
 
Univ of va intentional introduction 2013 01-31
Univ of va intentional introduction 2013 01-31Univ of va intentional introduction 2013 01-31
Univ of va intentional introduction 2013 01-31Magnus Christerson
 
Csharp Online 100
Csharp Online 100Csharp Online 100
Csharp Online 100reynolds
 

Tendances (20)

06 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_0806 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_08
 
13 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_1913 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_19
 
Annotating with Annotations - ForumPHP 2012
Annotating with Annotations - ForumPHP 2012Annotating with Annotations - ForumPHP 2012
Annotating with Annotations - ForumPHP 2012
 
Annotating with Annotations - DPC UnCon
Annotating with Annotations - DPC UnConAnnotating with Annotations - DPC UnCon
Annotating with Annotations - DPC UnCon
 
Flevy.com - Business Process Master List (BPML) Template
Flevy.com - Business Process Master List (BPML) TemplateFlevy.com - Business Process Master List (BPML) Template
Flevy.com - Business Process Master List (BPML) Template
 
ASE01.ppt
ASE01.pptASE01.ppt
ASE01.ppt
 
Consistent Modeling Technique for Accurate Transaction Level Models
Consistent Modeling Technique for Accurate Transaction Level ModelsConsistent Modeling Technique for Accurate Transaction Level Models
Consistent Modeling Technique for Accurate Transaction Level Models
 
JavaYDL12
JavaYDL12JavaYDL12
JavaYDL12
 
12slide
12slide12slide
12slide
 
Uni liverpool
Uni liverpoolUni liverpool
Uni liverpool
 
Real world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageReal world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same language
 
Patchwork3 D Modules January 2009
Patchwork3 D Modules January 2009Patchwork3 D Modules January 2009
Patchwork3 D Modules January 2009
 
Incremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIncremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation framework
 
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
 
7494604
74946047494604
7494604
 
On self-reproducing computer programs
On self-reproducing computer programsOn self-reproducing computer programs
On self-reproducing computer programs
 
ConsScale: A Cognitive Scale Inspired on Consciousness
ConsScale: A Cognitive Scale Inspired on ConsciousnessConsScale: A Cognitive Scale Inspired on Consciousness
ConsScale: A Cognitive Scale Inspired on Consciousness
 
Univ of va intentional introduction 2013 01-31
Univ of va intentional introduction 2013 01-31Univ of va intentional introduction 2013 01-31
Univ of va intentional introduction 2013 01-31
 
Csharp Online 100
Csharp Online 100Csharp Online 100
Csharp Online 100
 
Confluence
ConfluenceConfluence
Confluence
 

Similaire à Fudcon D programming

Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and EvolutionEelco Visser
 
Transforming a 15 year old model-driven application from C++ to Java
Transforming a 15 year old model-driven application from C++ to JavaTransforming a 15 year old model-driven application from C++ to Java
Transforming a 15 year old model-driven application from C++ to JavaEric Malotaux
 
L Fu - Dao: a novel programming language for bioinformatics
L Fu - Dao: a novel programming language for bioinformaticsL Fu - Dao: a novel programming language for bioinformatics
L Fu - Dao: a novel programming language for bioinformaticsJan Aerts
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Agora Group
 
robert-kovacsics-part-ii-dissertation
robert-kovacsics-part-ii-dissertationrobert-kovacsics-part-ii-dissertation
robert-kovacsics-part-ii-dissertationRobert Kovacsics
 
London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010Skills Matter
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)John Smith
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Wes Yanaga
 
The Function Pointer Tutorials
The Function Pointer TutorialsThe Function Pointer Tutorials
The Function Pointer TutorialsNont Banditwong
 
Dynamo visual programming for design
Dynamo visual programming for designDynamo visual programming for design
Dynamo visual programming for designĐan Nguyễn
 
Domain-Specific Profiling - TOOLS 2011
Domain-Specific Profiling - TOOLS 2011Domain-Specific Profiling - TOOLS 2011
Domain-Specific Profiling - TOOLS 2011Jorge Ressia
 
Dynamo with robot structural
Dynamo with robot structuralDynamo with robot structural
Dynamo with robot structuralTPHCM
 
Neal Ford Emergent Design And Evolutionary Architecture
Neal Ford Emergent Design And Evolutionary ArchitectureNeal Ford Emergent Design And Evolutionary Architecture
Neal Ford Emergent Design And Evolutionary ArchitectureThoughtworks
 
Half-automatic Compilable Source Code Recovery
Half-automatic Compilable Source Code RecoveryHalf-automatic Compilable Source Code Recovery
Half-automatic Compilable Source Code RecoveryJoxean Koret
 
2011.02.18 marco parenzan - case study. conversione di una applicazione for...
2011.02.18   marco parenzan - case study. conversione di una applicazione for...2011.02.18   marco parenzan - case study. conversione di una applicazione for...
2011.02.18 marco parenzan - case study. conversione di una applicazione for...Marco Parenzan
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 

Similaire à Fudcon D programming (20)

Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and Evolution
 
Transforming a 15 year old model-driven application from C++ to Java
Transforming a 15 year old model-driven application from C++ to JavaTransforming a 15 year old model-driven application from C++ to Java
Transforming a 15 year old model-driven application from C++ to Java
 
P code
P codeP code
P code
 
Thesis
ThesisThesis
Thesis
 
L Fu - Dao: a novel programming language for bioinformatics
L Fu - Dao: a novel programming language for bioinformaticsL Fu - Dao: a novel programming language for bioinformatics
L Fu - Dao: a novel programming language for bioinformatics
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
 
robert-kovacsics-part-ii-dissertation
robert-kovacsics-part-ii-dissertationrobert-kovacsics-part-ii-dissertation
robert-kovacsics-part-ii-dissertation
 
London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
Java Technicalities
Java TechnicalitiesJava Technicalities
Java Technicalities
 
The Function Pointer Tutorials
The Function Pointer TutorialsThe Function Pointer Tutorials
The Function Pointer Tutorials
 
Dynamo visual programming for design
Dynamo visual programming for designDynamo visual programming for design
Dynamo visual programming for design
 
Domain-Specific Profiling - TOOLS 2011
Domain-Specific Profiling - TOOLS 2011Domain-Specific Profiling - TOOLS 2011
Domain-Specific Profiling - TOOLS 2011
 
Dynamo with robot structural
Dynamo with robot structuralDynamo with robot structural
Dynamo with robot structural
 
Neal Ford Emergent Design And Evolutionary Architecture
Neal Ford Emergent Design And Evolutionary ArchitectureNeal Ford Emergent Design And Evolutionary Architecture
Neal Ford Emergent Design And Evolutionary Architecture
 
Half-automatic Compilable Source Code Recovery
Half-automatic Compilable Source Code RecoveryHalf-automatic Compilable Source Code Recovery
Half-automatic Compilable Source Code Recovery
 
2011.02.18 marco parenzan - case study. conversione di una applicazione for...
2011.02.18   marco parenzan - case study. conversione di una applicazione for...2011.02.18   marco parenzan - case study. conversione di una applicazione for...
2011.02.18 marco parenzan - case study. conversione di una applicazione for...
 
Let's us c language (sabeel Bugti)
Let's us c language (sabeel Bugti)Let's us c language (sabeel Bugti)
Let's us c language (sabeel Bugti)
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 

Dernier

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Dernier (20)

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Fudcon D programming

  • 1. D Programming . Jonathan MERCIER Introduction D Programming Object . In nutshell Functional Meta-programming Parallelism Ressource Management Contract Jonathan MERCIER System and Safe Code Reference and pointer Generics Inference Loops Functions December 9, 2012 Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . 1/122 . Let start it! D Programming . . . . Forward . GTK D
  • 2. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . 2/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 3. D Programming Jonathan MERCIER Before starting Introduction Object Functional Meta-programming Parallelism Ressource Management Contract System and Safe Code Reference and pointer Generics Inference Loops Functions Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . 3/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 4. D Programming Jonathan MERCIER Why a new language? Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Few significant dates System and Safe Code . Reference and pointer C++ 1983 Generics Inference Loops Functions Debugs Versions Requirement Editors Basics My first D program . Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . 4/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 5. D Programming Jonathan MERCIER Why a new language? Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Few significant dates System and Safe Code . Reference and pointer C++ 1983 Generics Inference Loops Java 1990 Functions Debugs Versions Requirement Editors Basics My first D program . Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . 4/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 6. D Programming Jonathan MERCIER Why a new language? Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Few significant dates System and Safe Code . Reference and pointer C++ 1983 Generics Inference Loops Java 1990 Functions Debugs Python 1995 Versions Requirement Editors Basics My first D program . Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . 4/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 7. D Programming Jonathan MERCIER Why a new language? Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Few significant dates System and Safe Code . Reference and pointer C++ 1983 Generics Inference Loops Java 1990 Functions Debugs Python 1995 Versions Requirement Ruby 1995 Editors Basics My first D program . Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . 4/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 8. D Programming Jonathan MERCIER Why a new language? Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Few significant dates System and Safe Code . Reference and pointer C++ 1983 Generics Inference Loops Java 1990 Functions Debugs Python 1995 Versions Requirement Ruby 1995 And now? Editors Basics My first D program . Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . 4/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 9. D Programming Jonathan MERCIER What is D programming? Introduction Object Functional Meta-programming Parallelism Ressource Management Contract System and Safe Code D is a modern language programming inspired by: Reference and pointer Generics C++ Inference Loops Java Functions Debugs Haskell Versions Requirement Python Editors Basics Ruby My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . 5/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 10. D Programming Jonathan MERCIER Why a new language? Introduction Object Functional Meta-programming Parallelism Ressource Management Contract System and Safe Code . Reference and pointer D Combines Generics . Inference Modeling Power Loops Functions Debugs Versions . Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 6/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 11. D Programming Jonathan MERCIER Why a new language? Introduction Object Functional Meta-programming Parallelism Ressource Management Contract System and Safe Code . Reference and pointer D Combines Generics . Inference Modeling Power Loops Functions Debugs Modern Convenience Versions . Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 6/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 12. D Programming Jonathan MERCIER Why a new language? Introduction Object Functional Meta-programming Parallelism Ressource Management Contract System and Safe Code . Reference and pointer D Combines Generics . Inference Modeling Power Loops Functions Debugs Modern Convenience Versions Native Efficiency . Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 6/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 13. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . 7/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 14. D Programming Jonathan MERCIER Object Introduction Object Functional Meta-programming . Parallelism Ressource Management Interface Contract 1 interface foo { …} System and Safe Code . Reference and pointer Generics Inference Loops Functions Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters . Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 8/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 15. D Programming Jonathan MERCIER Object Introduction Object Functional Meta-programming . Parallelism Ressource Management Interface Contract 1 interface foo { …} System and Safe Code . Reference and pointer Generics class Inference Loops 1 class bar { …} Functions . Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters . Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 8/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 16. D Programming Jonathan MERCIER Object Introduction Object Functional Meta-programming . Parallelism Ressource Management Interface Contract 1 interface foo { …} System and Safe Code . Reference and pointer Generics class Inference Loops 1 class bar { …} Functions . Debugs Versions inheritance Requirement 1 class bar: foo { …} Editors . Basics My first D program Types Arrays String and characters . Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 8/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 17. D Programming Jonathan MERCIER Object Introduction Object Functional Meta-programming . Parallelism Ressource Management Interface Contract 1 interface foo { …} System and Safe Code . Reference and pointer Generics class Inference Loops 1 class bar { …} Functions . Debugs Versions inheritance Requirement 1 class bar: foo { …} Editors . Basics My first D program multi class inheritance not allowed, instead used Types Arrays interface. String and characters . Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 8/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 18. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . 9/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 19. D Programming Jonathan MERCIER Functional Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Data immutability System and Safe Code Reference and pointer 1 immutable int[] a = [ 4, 6, 1, 2]; Generics . Inference Loops Functions Debugs Versions Requirement Editors Basics My first D program Types . Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 10/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 20. D Programming Jonathan MERCIER Functional Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Data immutability System and Safe Code Reference and pointer 1 immutable int[] a = [ 4, 6, 1, 2]; Generics . Inference Loops Pure functions Functions 1 pure int square(int x) { return x * x; } Debugs Versions . Requirement Editors Basics My first D program Types . Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 10/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 21. D Programming Jonathan MERCIER Functional Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Data immutability System and Safe Code Reference and pointer 1 immutable int[] a = [ 4, 6, 1, 2]; Generics . Inference Loops Pure functions Functions 1 pure int square(int x) { return x * x; } Debugs Versions . Requirement Editors Lambda functions 1 a.sort!( (x,y) => x < y ); // [ 1, 2, 4, 6 ] Basics . My first D program Types . Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . 10/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 22. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . . 11/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 23. D Programming Jonathan MERCIER Meta-programming Introduction Object Functional Meta-programming Parallelism Ressource Management Contract . System and Safe Code Combination of Reference and pointer . Generics templates Inference Loops Functions Debugs Versions Requirement Editors Basics . My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . 12/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 24. D Programming Jonathan MERCIER Meta-programming Introduction Object Functional Meta-programming Parallelism Ressource Management Contract . System and Safe Code Combination of Reference and pointer . Generics templates Inference Loops Functions compile time function execution Debugs Versions Requirement Editors Basics . My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . 12/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 25. D Programming Jonathan MERCIER Meta-programming Introduction Object Functional Meta-programming Parallelism Ressource Management Contract . System and Safe Code Combination of Reference and pointer . Generics templates Inference Loops Functions compile time function execution Debugs Versions tuples Requirement Editors Basics . My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . 12/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 26. D Programming Jonathan MERCIER Meta-programming Introduction Object Functional Meta-programming Parallelism Ressource Management Contract . System and Safe Code Combination of Reference and pointer . Generics templates Inference Loops Functions compile time function execution Debugs Versions tuples Requirement Editors string mixins Basics . My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . 12/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 27. D Programming Jonathan MERCIER Meta-programming Introduction Object Functional Meta-programming Parallelism Ressource Management Contract System and Safe Code Reference and pointer Code 1: Example Generics 1 template Factorial(ulong n){ Inference 2 static if(n < 2) Loops 3 const Factorial = 1; Functions 4 else Debugs 5 const Factorial = n * Factorial!(n − 1); Versions 6 } Requirement 7 const ulong var = Factorial!( 8 ); // compute at compile−time Editors . Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . 13/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 28. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . . 14/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 29. D Programming Jonathan MERCIER Parallelism Introduction Object Functional Meta-programming . Parallelism Ressource Management module to use Contract 1 import std.parallelism; System and Safe Code . Reference and pointer Generics Inference Loops Functions Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters . Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . .. . 15/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 30. D Programming Jonathan MERCIER Parallelism Introduction Object Functional Meta-programming . Parallelism Ressource Management module to use Contract 1 import std.parallelism; System and Safe Code . Reference and pointer Generics parallel loop Inference Loops 1 foreach( i; parallel( list ) ){ …} Functions . Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters . Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . .. . 15/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 31. D Programming Jonathan MERCIER Parallelism Introduction Object Functional Meta-programming . Parallelism Ressource Management module to use Contract 1 import std.parallelism; System and Safe Code . Reference and pointer Generics parallel loop Inference Loops 1 foreach( i; parallel( list ) ){ …} Functions . Debugs Versions Requirement Pool thread Editors 1 void myfunction( int param1, int param 2 ){ …} 2 auto myTask = task!myfunction( param1, param2 ); Basics 3 taskPool.put( myTask ); My first D program 4 doSomething(); // another work in parallel Types 5 taskPool.finish( true ); // wait alls jobs ending Arrays . String and characters . Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . .. . 15/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 32. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . . . 16/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 33. D Programming Jonathan MERCIER Ressource Management Introduction Object Functional Meta-programming Parallelism Ressource Management Contract System and Safe Code Reference and pointer Code 2: Example Generics Inference 1 File f = File( ”myfile.txt”, ”r”); Loops 2 scope(exit) f.close(); 3 lockFile( f ); Functions 4 doFoo( f ); Debugs 5 scope(success) doBar( f ); Versions 6 scope(failure) unlock( f ); Requirement Editors . Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . . 17/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 34. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . . . 18/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 35. D Programming Jonathan MERCIER Contract Introduction Object . Functional check a statement Meta-programming 1 assert( var != null ); Parallelism Ressource Management . Contract System and Safe Code Reference and pointer Generics Inference Loops Functions Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class . Template Miscellanous . . . . . . . 19/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 36. D Programming Jonathan MERCIER Contract Introduction Object . Functional check a statement Meta-programming 1 assert( var != null ); Parallelism Ressource Management . Contract System and Safe Code check before entering into a function Reference and pointer 1 double foo ( int a ) Generics 2 in{ assert( a > 0 ); } Inference 3 body { return a − 2; } Loops Functions . Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class . Template Miscellanous . . . . . . . 19/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 37. D Programming Jonathan MERCIER Contract Introduction Object . Functional check a statement Meta-programming 1 assert( var != null ); Parallelism Ressource Management . Contract System and Safe Code check before entering into a function Reference and pointer 1 double foo ( int a ) Generics 2 in{ assert( a > 0 ); } Inference 3 body { return a − 2; } Loops Functions . Debugs Versions check at function exit Requirement 1 int foo ( int a ) Editors 2 out{ assert( a > 0 ); } 3 body { return a − 2; } Basics My first D program . Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class . Template Miscellanous . . . . . . . 19/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 38. D Programming Jonathan MERCIER Contract Introduction Object . Functional check a statement Meta-programming 1 assert( var != null ); Parallelism Ressource Management . Contract System and Safe Code check before entering into a function Reference and pointer 1 double foo ( int a ) Generics 2 in{ assert( a > 0 ); } Inference 3 body { return a − 2; } Loops Functions . Debugs Versions check at function exit Requirement 1 int foo ( int a ) Editors 2 out{ assert( a > 0 ); } 3 body { return a − 2; } Basics My first D program . -release flag will not compute contract Types Arrays String and characters Const and Immutable $ ldc2 -release foo.d Input/Output . Algorithm Structure and Class . Template Miscellanous . . . . . . . 19/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 39. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . . . 20/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 40. D Programming Jonathan MERCIER System and Safe Code Introduction Object Functional . Meta-programming System and Safe Code Parallelism . Ressource Management Contract Safe functions are functions that are statically checked System and Safe Code Reference and pointer to have no possibility of undefined behavior. Generics Inference Loops Functions Debugs Undefined behavior is often used as a vector for Versions Requirement malicious attacks. Editors Basics My first D program Types Arrays Func­tions are marked with at­tributes: @safe, String and characters Const and Immutable @system, @trusted . Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . . . 21/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 41. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . . . . 22/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 42. D Programming Jonathan MERCIER Reference and pointer Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Pointers exist only to create C interface code System and Safe Code 1 int* a = cFunction( param ); Reference and pointer Generics . Inference Loops Functions Debugs Versions Requirement Editors Basics My first D program Types . Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . . . 23/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 43. D Programming Jonathan MERCIER Reference and pointer Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Pointers exist only to create C interface code System and Safe Code 1 int* a = cFunction( param ); Reference and pointer Generics . Inference Loops ref into function Functions 1 void foo( ref int[] param ) { …} Debugs Versions . Requirement Editors Basics My first D program Types . Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . . . 23/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 44. D Programming Jonathan MERCIER Reference and pointer Introduction Object Functional Meta-programming Parallelism Ressource Management . Contract Pointers exist only to create C interface code System and Safe Code 1 int* a = cFunction( param ); Reference and pointer Generics . Inference Loops ref into function Functions 1 void foo( ref int[] param ) { …} Debugs Versions . Requirement Editors ref into a loop Basics 1 foreach( ref item ; list ){ …} . My first D program Types . Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . . . 23/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 45. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . . . . . 24/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 46. D Programming Jonathan MERCIER . Generic Introduction . Object class Functional 1 class Foo( T ){ …} Meta-programming 2 Foo!int instance = new Foo!(int)( param ); Parallelism . Ressource Management Contract System and Safe Code Reference and pointer Generics Inference Loops Functions Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output . Algorithm Structure and Class Template Miscellanous . . . . .. . . 25/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 47. D Programming Jonathan MERCIER . Generic Introduction . Object class Functional 1 class Foo( T ){ …} Meta-programming 2 Foo!int instance = new Foo!(int)( param ); Parallelism . Ressource Management Contract System and Safe Code structure Reference and pointer 1 struct Foo( T ){ …} Generics 2 Foo!int instance = Foo!int( param ); Inference . Loops Functions Debugs Versions Requirement Editors Basics My first D program Types Arrays String and characters Const and Immutable Input/Output . Algorithm Structure and Class Template Miscellanous . . . . .. . . 25/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 48. D Programming Jonathan MERCIER . Generic Introduction . Object class Functional 1 class Foo( T ){ …} Meta-programming 2 Foo!int instance = new Foo!(int)( param ); Parallelism . Ressource Management Contract System and Safe Code structure Reference and pointer 1 struct Foo( T ){ …} Generics 2 Foo!int instance = Foo!int( param ); Inference . Loops Functions function Debugs 1 T foo( T )(T param){ …} Versions 2 int var = foo!int( param ); Requirement Editors . Basics My first D program Types Arrays String and characters Const and Immutable Input/Output . Algorithm Structure and Class Template Miscellanous . . . . .. . . 25/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 49. D Programming Jonathan MERCIER . Generic Introduction . Object class Functional 1 class Foo( T ){ …} Meta-programming 2 Foo!int instance = new Foo!(int)( param ); Parallelism . Ressource Management Contract System and Safe Code structure Reference and pointer 1 struct Foo( T ){ …} Generics 2 Foo!int instance = Foo!int( param ); Inference . Loops Functions function Debugs 1 T foo( T )(T param){ …} Versions 2 int var = foo!int( param ); Requirement Editors . Basics macro My first D program 1 template TFoo( T )( T param ){ immutable T f = param + 3; Types } Arrays 2 int a = TFoo!int( 4 ) ; // return 7 at compile time String and characters . Const and Immutable Input/Output . Algorithm Structure and Class Template Miscellanous . . . . .. . . 25/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 50. D Programming Jonathan MERCIER Plan .. 1 Introduction Introduction Object Object Functional Functional Meta-programming Meta-programming Parallelism Parallelism Ressource Management Ressource Management Contract System and Safe Code Contract Reference and pointer System and Safe Code Generics Reference and pointer Inference Generics Loops Inference Functions Loops Debugs Functions Versions Debugs Requirement Versions Editors Requirement . 2 Basics Editors My first D program Types Basics Arrays My first D program String and characters Types Const and Immutable Arrays Input/Output String and characters Algorithm Const and Immutable Structure and Class Input/Output Template Algorithm Miscellanous Structure and Class Let start it! . 3 GTK D Template . 4 Thanks To Miscellanous . . . . .. . . . 26/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D
  • 51. D Programming Jonathan MERCIER Inference Introduction Object Functional Meta-programming Parallelism Ressource Management Contract . System and Safe Code Reference and pointer auto for variable Generics 1 size_t[] list = [ 0, 1, 2, 3, 4]; Inference 2 auto item = list[1]; // item type is size_t Loops . Functions Debugs Versions Requirement Editors . Basics My first D program Types Arrays String and characters Const and Immutable Input/Output Algorithm Structure and Class Template Miscellanous . . . . . . . . . 27/122 . Let start it! D Programming . . . . Back . . . . . Forward . GTK D