SlideShare a Scribd company logo
1 of 42
Linguagem de programação
 C#
            Adriele Alvarenga
            Claudson Oliveira
Histórico
• C#
  – Surgimento: 2001
  – Influências: Java, C++ , Object pascal, etc...
Histórico
• C#
  – Surgimento: 2001
  – Influências: Java, C++ , Object pascal, etc...
  – Anders Hejlsberg (Turbo pascal e Borland Delphi)
Histórico
• C#
  – Surgimento: 2001
  – Influências: Java, C++ , Object pascal, etc...
  – Anders Hejlsberg (Turbo pascal e Borland Delphi)
  – Objetivo: Plataforma .NET
Características
• Normalizada (ECMA 334 e ISO/IEC 23270)
Características
• Normalizada (ECMA 334 e ISO/IEC 23270)
• Orientada a objetos
Características
• Normalizada (ECMA 334 e ISO/IEC 23270)
• Orientada a objetos
• Compilação
Características
•   Normalizada (ECMA 334 e ISO/IEC 23270)
•   Orientada a objetos
•   Compilação
•   Visual Studio ou C# Express
Propriedades
• Legibilidade e Redigibilidade
Propriedades
• Legibilidade e Redigibilidade
  – Baseada em C++ e Java
Propriedades
• Legibilidade e Redigibilidade
  – Baseada em C++ e Java
   public class Hello1
   {
             public static void Main()
             {
                       System.Console.WriteLine("Hello, World!");
             }
   }
Propriedades
• Confiabilidade
  – Tratamento de exceções
Propriedades
• Confiabilidade
  – Tratamento de exceções
  – Utilização de ponteiros (unsafe)
Propriedades
• Confiabilidade
  – Tratamento de exceções
  – Utilização de ponteiros (unsafe)
  – Coletor de lixo
Propriedades
• Confiabilidade
  – Tratamento de exceções
  – Utilização de ponteiros (unsafe)
  – Coletor de lixo
Propriedades
• Confiabilidade
  – Tratamento de exceções
  – Utilização de ponteiros (unsafe)
  – Coletor de lixo

       unsafe static void usandoPonteiros(int* p)
       {
         int numero = 4;
         p = &numero ;
       }
Coletor de lixo
• Gerência de memória da Heap
Coletor de lixo
• Gerência de memória da Heap
• Biblioteca Win32
Coletor de lixo
• Gerência de memória da Heap
• Biblioteca Win32
Coletor de lixo
• Gerência de memória da Heap
• Biblioteca Win32
• Busca linear
Coletor de lixo
• Gerência de memória da Heap
• Biblioteca Win32
• Busca linear
Coletor de lixo
• Memória dividida
Propriedades
• Ortogonalidade
  – Permite uso dos conceitos básicos
Propriedades
• Ortogonalidade
  – Permite uso dos conceitos básicos
  – Poucas exceções
     • Ponteiros para void, array do tipo void
Propriedades
• Eficiência
  – .NET
     • Just-in-time
Propriedades
• Eficiência
  – .NET
     • Just-in-time
     • Compilação híbrida
Propriedades
• Eficiência
  – .NET
     • Just-in-time
     • Compilação híbrida
     • Otimização de instruções
Propriedades
• Portabilidade
  – dotGNU
Propriedades
• Portabilidade
  – dotGNU
  – Portable .NET
Propriedades
• Portabilidade
  – dotGNU
  – Portable .NET
  – Mono (Novell)
Propriedades
• Portabilidade
  – dotGNU
  – Portable .NET
  – Mono (Novell)
Entrevista
Entrevista
How long is the future of C#? You’ve been on it for almost 10
years.


 C# the project started in late December of ‘98, so we’re coming up on our 10-year
 anniversary. That’s not 10 years of existing in the industry, but it’s 10 years since
 inception internally. I’d say we’ve got another 10 years at least, but it all depends.
 I’ve said
 I’ve long given up predicting the far-off future of this industry because no one ever
 gets it
 right anyway. But I certainly see a strong healthy future for C#. We’re not done
 innovat-ing, and there’s plenty of work still to do.
Entrevista
Do you get feedback regarding the C# language, not just the
implementation?
   (…) I read people’s blogs, I read forums where people ask technical
   questions, go to conferences—all sorts of ways that we get feedback daily
   on what works and what doesn’t in the language. We take that feedback
   back to the design team and we maintain a long laundry list of all of the
   crazy ideas. Some of them will never make it into the lan-guage, but we
   keep them on the list because there’s something there that maybe someday
   we’ll get a good idea around this area. We know that we don’t have it right
   yet, but there’s a desire to do something. Certainly there’s no way we could
   design the language without all this feedback, so it’s all based on listening to
   what people do with
   the product.
Entrevista

When I compare C# to Java, C# seems to have a stronger push
toward evolution. The Java people seem to want a baseline
where everyone’s code looks more or less the same. Whether
you’ve programmed Java for a decade, never programmed
before, or just graduated from a six-month course on Java, all
of your code will look the same. C# seems to pull in new ideas
from Haskell or from F#. Is there a desire to add new features
that people who’ve just finished the six-month C# course
haven’t seen and won’t immediately understand?
Entrevista
I am not in this to engineer the next COBOL; let’s just put it that way.
What is it that powers the Internet revolution and the electronic revolution
that we’ve seen? It’s the fact that we’re constantly evolving. I bring it back
to that. The minute you stop evolving, I don’t know that you’re adding any
value. This is, again, taking it to the extreme. Of course, there is value in
stability of the platform, but I think you provide that value by ensuring
backward compatibility. You are free to get off the bus at C# 1.0 and just
not move any further. For those people that really want to be more
productive and want to build newer kinds of apps like SOA or whatever and
get into more dynamic styles of programming—adaptable programs and
more declarative styles of programming like we’re doing with LINQ—then
you’ve got to evolve or get out of the way, or something else will replace
you.
Entrevista

What do you suggest to become a better C# programmer?

   It’s hard. There are many good books out there on C# programming and I
   would encourage people to pick up one of the better books. I’m not going to
   start naming names here, but there are many good books out there that will
   help you become a better C# pro-grammer and help you better understand
   the .NET Framework. There are many things available online that also help.
   There are things like Codeplex. There’s a bunch of open source projects that
   you can grab and look at and learn from and so forth.
   To become a better programmer in general, one of the things that have
   helped me is to look at different styles of programming and different kinds
   of programming languages(…)
Entrevista
 What’s facing us now and in five years?
Concurrency is the big one right now. That thing is right in our face, and we’ve got to
find solutions to that problem. One of my biggest challenges in the foreseeable future is
having our team work that issue.
Again, we’d like to do it in an evolutionary fashion, but how do you deal with the shared
state problem and side effects without breaking all the existing code? We don’t know
yet, but it very well may be that that concurrency is a big enough paradigm change that
whole new languages are needed or whole new frameworks are needed. Although I
don’t think we’re at that point yet. I think there’s a lot of ground that we can gain from
making it possible for people to write APIs that internally are massively parallel and
written by people that really understand a particular domain, be it transformations or
numeric processing or signal processing or bit- maps or image manipulation. (…)
Entrevista
Does the object-oriented paradigm create problems?
You know, it depends on what you group under the object-oriented paradigm.
Polymorphism and encapsulation and inheritance are as such not a problem,
although functional languages typically have a different view of how you do
polymorphism with their algebraic data types. Aside from that, I think the biggest
problem typically with object-oriented programming is that people do their object-
oriented programming in a very imperative manner where objects encapsulate
mutable state and you call methods or send messages to objects that cause them to
modify themselves unbeknownst to other people that are referencing these objects.
Now you end up with side effects that surprise you that you can’t analyze.
In that sense object-oriented programming is a problem, but you could do object-
oriented programming with immutable objects. Then you wouldn’t have these same
problems. That’s kind of what functional programming languages are doing, for
example.
Entrevista
  Regarding your interest in functional programming, should
  computer science students study more math and experiment
  more with functional programming?


Well, I certainly think that it is important to include functional programming in
any computer science curricula. Whether you start with it that depends. I’m not sure that
your very first introduction to programming should be functional programming, but I
definitely think that it ought to be part of a curriculum.
Entrevista

What lessons should people learn from your experience?


Well, if you look at the first product I worked on, Turbo Pascal, it was very much
about not believing the traditional way of doing things. Don’t be afraid. Just because peo
ple tell you it can’t be done, that doesn’t necessarily mean that it can’t be done. It just
means that they can’t do it. I think it’s always fun to think outside of the box and try to
find new solutions to existing problems.
It was the only thing I wanted to do. I was very, very passionate about it.
You have to have that passion to get really good at something, because that makes you
put in the hours, and the hours are the real key. You need to put in a lot of work.

More Related Content

What's hot

Chinese Proverbs—PHP|tek
Chinese Proverbs—PHP|tekChinese Proverbs—PHP|tek
Chinese Proverbs—PHP|tekterry chay
 
Forget Ruby. Forget CoffeeScript. Do SOA
Forget Ruby. Forget CoffeeScript. Do SOAForget Ruby. Forget CoffeeScript. Do SOA
Forget Ruby. Forget CoffeeScript. Do SOAMichał Łomnicki
 
GDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaGDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaPeter Kofler
 
I broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projectsI broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projectsBert JW Regeer
 
My experience of Ruby Education in Taiwan
My experience of Ruby Education in TaiwanMy experience of Ruby Education in Taiwan
My experience of Ruby Education in TaiwanMu-Fan Teng
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to JavascriptKevin Ball
 
Pair Programming (2015)
Pair Programming (2015)Pair Programming (2015)
Pair Programming (2015)Peter Kofler
 
Automating boring and repetitive UbuCon Asia video and subtitle stuffs
Automating boring and repetitive UbuCon Asia video and subtitle stuffsAutomating boring and repetitive UbuCon Asia video and subtitle stuffs
Automating boring and repetitive UbuCon Asia video and subtitle stuffsYoungbin Han
 
Kotlin @ StrangeLoop 2011
Kotlin @ StrangeLoop 2011Kotlin @ StrangeLoop 2011
Kotlin @ StrangeLoop 2011Andrey Breslav
 
Meta Programming in Ruby - Code Camp 2010
Meta Programming in Ruby - Code Camp 2010Meta Programming in Ruby - Code Camp 2010
Meta Programming in Ruby - Code Camp 2010ssoroka
 
F# for startups
F# for startupsF# for startups
F# for startupsjoelgrus
 

What's hot (12)

Chinese Proverbs—PHP|tek
Chinese Proverbs—PHP|tekChinese Proverbs—PHP|tek
Chinese Proverbs—PHP|tek
 
Forget Ruby. Forget CoffeeScript. Do SOA
Forget Ruby. Forget CoffeeScript. Do SOAForget Ruby. Forget CoffeeScript. Do SOA
Forget Ruby. Forget CoffeeScript. Do SOA
 
GDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaGDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran Canaria
 
I broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projectsI broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projects
 
Backend roadmap
Backend roadmapBackend roadmap
Backend roadmap
 
My experience of Ruby Education in Taiwan
My experience of Ruby Education in TaiwanMy experience of Ruby Education in Taiwan
My experience of Ruby Education in Taiwan
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
 
Pair Programming (2015)
Pair Programming (2015)Pair Programming (2015)
Pair Programming (2015)
 
Automating boring and repetitive UbuCon Asia video and subtitle stuffs
Automating boring and repetitive UbuCon Asia video and subtitle stuffsAutomating boring and repetitive UbuCon Asia video and subtitle stuffs
Automating boring and repetitive UbuCon Asia video and subtitle stuffs
 
Kotlin @ StrangeLoop 2011
Kotlin @ StrangeLoop 2011Kotlin @ StrangeLoop 2011
Kotlin @ StrangeLoop 2011
 
Meta Programming in Ruby - Code Camp 2010
Meta Programming in Ruby - Code Camp 2010Meta Programming in Ruby - Code Camp 2010
Meta Programming in Ruby - Code Camp 2010
 
F# for startups
F# for startupsF# for startups
F# for startups
 

Viewers also liked

Assembly para pc-25paginas
Assembly para pc-25paginasAssembly para pc-25paginas
Assembly para pc-25paginasMikeNandes
 
Análise assintótica
Análise assintóticaAnálise assintótica
Análise assintóticaPablo Silva
 
Glosario de qbasic liliana
Glosario de qbasic lilianaGlosario de qbasic liliana
Glosario de qbasic lilianakhjhjhjh
 
Conceitos básicos de AEDS
Conceitos básicos de AEDSConceitos básicos de AEDS
Conceitos básicos de AEDSPablo Silva
 
Slide Aula - Curso CakePHP
Slide Aula - Curso CakePHPSlide Aula - Curso CakePHP
Slide Aula - Curso CakePHPRangel Javier
 
Dicas para aumentar a performance de um software PHP
Dicas para aumentar a performance de um software PHPDicas para aumentar a performance de um software PHP
Dicas para aumentar a performance de um software PHPAlmir Neto
 
CakePHP com sotaque brasileiro
CakePHP com sotaque brasileiroCakePHP com sotaque brasileiro
CakePHP com sotaque brasileiroJuan Basso
 
CakePHP - Aprendendo a fazer o primeiro bolo
CakePHP - Aprendendo a fazer o primeiro boloCakePHP - Aprendendo a fazer o primeiro bolo
CakePHP - Aprendendo a fazer o primeiro boloelliando dias
 
Relações de recorrência
Relações de recorrênciaRelações de recorrência
Relações de recorrênciaPablo Silva
 
Otimizacao de websites em PHP
Otimizacao de websites em PHPOtimizacao de websites em PHP
Otimizacao de websites em PHPFelipe Ribeiro
 
CakePHP e o desenvolvimento rápido
CakePHP e o desenvolvimento rápidoCakePHP e o desenvolvimento rápido
CakePHP e o desenvolvimento rápidoIvan Rosolen
 
Trabalho cobol e basic
Trabalho cobol e basicTrabalho cobol e basic
Trabalho cobol e basicDaniel Carrara
 
Análise da complexidade de algoritmos
Análise da complexidade de algoritmosAnálise da complexidade de algoritmos
Análise da complexidade de algoritmosPablo Silva
 

Viewers also liked (20)

PROGRAMAS QBASIC
PROGRAMAS QBASICPROGRAMAS QBASIC
PROGRAMAS QBASIC
 
Assembly para pc-25paginas
Assembly para pc-25paginasAssembly para pc-25paginas
Assembly para pc-25paginas
 
Recursividade
RecursividadeRecursividade
Recursividade
 
Análise assintótica
Análise assintóticaAnálise assintótica
Análise assintótica
 
Funções em C
Funções em CFunções em C
Funções em C
 
Glosario de qbasic liliana
Glosario de qbasic lilianaGlosario de qbasic liliana
Glosario de qbasic liliana
 
Conceitos básicos de AEDS
Conceitos básicos de AEDSConceitos básicos de AEDS
Conceitos básicos de AEDS
 
Slide Aula - Curso CakePHP
Slide Aula - Curso CakePHPSlide Aula - Curso CakePHP
Slide Aula - Curso CakePHP
 
Apostila cobol
Apostila cobolApostila cobol
Apostila cobol
 
Dicas para aumentar a performance de um software PHP
Dicas para aumentar a performance de um software PHPDicas para aumentar a performance de um software PHP
Dicas para aumentar a performance de um software PHP
 
CakePHP com sotaque brasileiro
CakePHP com sotaque brasileiroCakePHP com sotaque brasileiro
CakePHP com sotaque brasileiro
 
Introdução ao PHP
Introdução ao PHPIntrodução ao PHP
Introdução ao PHP
 
Linguagem C - Uniões
Linguagem C - UniõesLinguagem C - Uniões
Linguagem C - Uniões
 
CakePHP - Aprendendo a fazer o primeiro bolo
CakePHP - Aprendendo a fazer o primeiro boloCakePHP - Aprendendo a fazer o primeiro bolo
CakePHP - Aprendendo a fazer o primeiro bolo
 
Relações de recorrência
Relações de recorrênciaRelações de recorrência
Relações de recorrência
 
Otimizacao de websites em PHP
Otimizacao de websites em PHPOtimizacao de websites em PHP
Otimizacao de websites em PHP
 
Linguagem C - Estruturas
Linguagem C - EstruturasLinguagem C - Estruturas
Linguagem C - Estruturas
 
CakePHP e o desenvolvimento rápido
CakePHP e o desenvolvimento rápidoCakePHP e o desenvolvimento rápido
CakePHP e o desenvolvimento rápido
 
Trabalho cobol e basic
Trabalho cobol e basicTrabalho cobol e basic
Trabalho cobol e basic
 
Análise da complexidade de algoritmos
Análise da complexidade de algoritmosAnálise da complexidade de algoritmos
Análise da complexidade de algoritmos
 

Similar to C# .NET - Um overview da linguagem

From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye codeKim Moir
 
Domain-Driven Design: The "What" and the "Why"
Domain-Driven Design: The "What" and the "Why"Domain-Driven Design: The "What" and the "Why"
Domain-Driven Design: The "What" and the "Why"bincangteknologi
 
Deployment is the new build
Deployment is the new buildDeployment is the new build
Deployment is the new buildAndrew Phillips
 
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" Ecosystems
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" EcosystemsPyData Frankfurt - (Efficient) Data Exchange with "Foreign" Ecosystems
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" EcosystemsUwe Korn
 
The Ring programming language version 1.10 book - Part 99 of 212
The Ring programming language version 1.10 book - Part 99 of 212The Ring programming language version 1.10 book - Part 99 of 212
The Ring programming language version 1.10 book - Part 99 of 212Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 77 of 84
The Ring programming language version 1.2 book - Part 77 of 84The Ring programming language version 1.2 book - Part 77 of 84
The Ring programming language version 1.2 book - Part 77 of 84Mahmoud Samir Fayed
 
top developer mistakes
top developer mistakes top developer mistakes
top developer mistakes Hanokh Aloni
 
Neil Perlin - We're Going Mobile! Great! Are We Ready?
Neil Perlin - We're Going Mobile! Great! Are We Ready?Neil Perlin - We're Going Mobile! Great! Are We Ready?
Neil Perlin - We're Going Mobile! Great! Are We Ready?LavaConConference
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applicationseightbit
 
The Journey to Master Code Design
The Journey to Master Code DesignThe Journey to Master Code Design
The Journey to Master Code DesignAlexandru Bolboaca
 
We’re Going Mobile! Great! Wait… What Does That Mean?
We’re Going Mobile! Great! Wait… What Does That Mean?We’re Going Mobile! Great! Wait… What Does That Mean?
We’re Going Mobile! Great! Wait… What Does That Mean?STC-Philadelphia Metro Chapter
 
Ruby codebases in an entropic universe
Ruby codebases in an entropic universeRuby codebases in an entropic universe
Ruby codebases in an entropic universeNiranjan Paranjape
 
The Ring programming language version 1.5.3 book - Part 186 of 194
The Ring programming language version 1.5.3 book - Part 186 of 194The Ring programming language version 1.5.3 book - Part 186 of 194
The Ring programming language version 1.5.3 book - Part 186 of 194Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 81 of 88
The Ring programming language version 1.3 book - Part 81 of 88The Ring programming language version 1.3 book - Part 81 of 88
The Ring programming language version 1.3 book - Part 81 of 88Mahmoud Samir Fayed
 
Beyond the Hype: 4 Years of Go in Production
Beyond the Hype: 4 Years of Go in ProductionBeyond the Hype: 4 Years of Go in Production
Beyond the Hype: 4 Years of Go in ProductionC4Media
 
The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196Mahmoud Samir Fayed
 
Paris Web - Javascript as a programming language
Paris Web - Javascript as a programming languageParis Web - Javascript as a programming language
Paris Web - Javascript as a programming languageMarco Cedaro
 

Similar to C# .NET - Um overview da linguagem (20)

From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye code
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
 
Domain-Driven Design: The "What" and the "Why"
Domain-Driven Design: The "What" and the "Why"Domain-Driven Design: The "What" and the "Why"
Domain-Driven Design: The "What" and the "Why"
 
Deployment is the new build
Deployment is the new buildDeployment is the new build
Deployment is the new build
 
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" Ecosystems
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" EcosystemsPyData Frankfurt - (Efficient) Data Exchange with "Foreign" Ecosystems
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" Ecosystems
 
The Ring programming language version 1.10 book - Part 99 of 212
The Ring programming language version 1.10 book - Part 99 of 212The Ring programming language version 1.10 book - Part 99 of 212
The Ring programming language version 1.10 book - Part 99 of 212
 
The Ring programming language version 1.2 book - Part 77 of 84
The Ring programming language version 1.2 book - Part 77 of 84The Ring programming language version 1.2 book - Part 77 of 84
The Ring programming language version 1.2 book - Part 77 of 84
 
top developer mistakes
top developer mistakes top developer mistakes
top developer mistakes
 
Neil Perlin - We're Going Mobile! Great! Are We Ready?
Neil Perlin - We're Going Mobile! Great! Are We Ready?Neil Perlin - We're Going Mobile! Great! Are We Ready?
Neil Perlin - We're Going Mobile! Great! Are We Ready?
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
 
The Journey to Master Code Design
The Journey to Master Code DesignThe Journey to Master Code Design
The Journey to Master Code Design
 
We’re Going Mobile! Great! Wait… What Does That Mean?
We’re Going Mobile! Great! Wait… What Does That Mean?We’re Going Mobile! Great! Wait… What Does That Mean?
We’re Going Mobile! Great! Wait… What Does That Mean?
 
Ruby codebases in an entropic universe
Ruby codebases in an entropic universeRuby codebases in an entropic universe
Ruby codebases in an entropic universe
 
The Ring programming language version 1.5.3 book - Part 186 of 194
The Ring programming language version 1.5.3 book - Part 186 of 194The Ring programming language version 1.5.3 book - Part 186 of 194
The Ring programming language version 1.5.3 book - Part 186 of 194
 
The Ring programming language version 1.3 book - Part 81 of 88
The Ring programming language version 1.3 book - Part 81 of 88The Ring programming language version 1.3 book - Part 81 of 88
The Ring programming language version 1.3 book - Part 81 of 88
 
Beyond the Hype: 4 Years of Go in Production
Beyond the Hype: 4 Years of Go in ProductionBeyond the Hype: 4 Years of Go in Production
Beyond the Hype: 4 Years of Go in Production
 
The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196
 
Paris Web - Javascript as a programming language
Paris Web - Javascript as a programming languageParis Web - Javascript as a programming language
Paris Web - Javascript as a programming language
 
Shuzworld Analysis
Shuzworld AnalysisShuzworld Analysis
Shuzworld Analysis
 
OOP Java
OOP JavaOOP Java
OOP Java
 

Recently uploaded

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 

Recently uploaded (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 

C# .NET - Um overview da linguagem

  • 1.
  • 2. Linguagem de programação C# Adriele Alvarenga Claudson Oliveira
  • 3. Histórico • C# – Surgimento: 2001 – Influências: Java, C++ , Object pascal, etc...
  • 4. Histórico • C# – Surgimento: 2001 – Influências: Java, C++ , Object pascal, etc... – Anders Hejlsberg (Turbo pascal e Borland Delphi)
  • 5. Histórico • C# – Surgimento: 2001 – Influências: Java, C++ , Object pascal, etc... – Anders Hejlsberg (Turbo pascal e Borland Delphi) – Objetivo: Plataforma .NET
  • 7. Características • Normalizada (ECMA 334 e ISO/IEC 23270) • Orientada a objetos
  • 8. Características • Normalizada (ECMA 334 e ISO/IEC 23270) • Orientada a objetos • Compilação
  • 9. Características • Normalizada (ECMA 334 e ISO/IEC 23270) • Orientada a objetos • Compilação • Visual Studio ou C# Express
  • 11. Propriedades • Legibilidade e Redigibilidade – Baseada em C++ e Java
  • 12. Propriedades • Legibilidade e Redigibilidade – Baseada em C++ e Java public class Hello1 { public static void Main() { System.Console.WriteLine("Hello, World!"); } }
  • 13. Propriedades • Confiabilidade – Tratamento de exceções
  • 14. Propriedades • Confiabilidade – Tratamento de exceções – Utilização de ponteiros (unsafe)
  • 15. Propriedades • Confiabilidade – Tratamento de exceções – Utilização de ponteiros (unsafe) – Coletor de lixo
  • 16. Propriedades • Confiabilidade – Tratamento de exceções – Utilização de ponteiros (unsafe) – Coletor de lixo
  • 17. Propriedades • Confiabilidade – Tratamento de exceções – Utilização de ponteiros (unsafe) – Coletor de lixo unsafe static void usandoPonteiros(int* p) { int numero = 4; p = &numero ; }
  • 18. Coletor de lixo • Gerência de memória da Heap
  • 19. Coletor de lixo • Gerência de memória da Heap • Biblioteca Win32
  • 20. Coletor de lixo • Gerência de memória da Heap • Biblioteca Win32
  • 21. Coletor de lixo • Gerência de memória da Heap • Biblioteca Win32 • Busca linear
  • 22. Coletor de lixo • Gerência de memória da Heap • Biblioteca Win32 • Busca linear
  • 23. Coletor de lixo • Memória dividida
  • 24. Propriedades • Ortogonalidade – Permite uso dos conceitos básicos
  • 25. Propriedades • Ortogonalidade – Permite uso dos conceitos básicos – Poucas exceções • Ponteiros para void, array do tipo void
  • 26. Propriedades • Eficiência – .NET • Just-in-time
  • 27. Propriedades • Eficiência – .NET • Just-in-time • Compilação híbrida
  • 28. Propriedades • Eficiência – .NET • Just-in-time • Compilação híbrida • Otimização de instruções
  • 30. Propriedades • Portabilidade – dotGNU – Portable .NET
  • 31. Propriedades • Portabilidade – dotGNU – Portable .NET – Mono (Novell)
  • 32. Propriedades • Portabilidade – dotGNU – Portable .NET – Mono (Novell)
  • 34. Entrevista How long is the future of C#? You’ve been on it for almost 10 years. C# the project started in late December of ‘98, so we’re coming up on our 10-year anniversary. That’s not 10 years of existing in the industry, but it’s 10 years since inception internally. I’d say we’ve got another 10 years at least, but it all depends. I’ve said I’ve long given up predicting the far-off future of this industry because no one ever gets it right anyway. But I certainly see a strong healthy future for C#. We’re not done innovat-ing, and there’s plenty of work still to do.
  • 35. Entrevista Do you get feedback regarding the C# language, not just the implementation? (…) I read people’s blogs, I read forums where people ask technical questions, go to conferences—all sorts of ways that we get feedback daily on what works and what doesn’t in the language. We take that feedback back to the design team and we maintain a long laundry list of all of the crazy ideas. Some of them will never make it into the lan-guage, but we keep them on the list because there’s something there that maybe someday we’ll get a good idea around this area. We know that we don’t have it right yet, but there’s a desire to do something. Certainly there’s no way we could design the language without all this feedback, so it’s all based on listening to what people do with the product.
  • 36. Entrevista When I compare C# to Java, C# seems to have a stronger push toward evolution. The Java people seem to want a baseline where everyone’s code looks more or less the same. Whether you’ve programmed Java for a decade, never programmed before, or just graduated from a six-month course on Java, all of your code will look the same. C# seems to pull in new ideas from Haskell or from F#. Is there a desire to add new features that people who’ve just finished the six-month C# course haven’t seen and won’t immediately understand?
  • 37. Entrevista I am not in this to engineer the next COBOL; let’s just put it that way. What is it that powers the Internet revolution and the electronic revolution that we’ve seen? It’s the fact that we’re constantly evolving. I bring it back to that. The minute you stop evolving, I don’t know that you’re adding any value. This is, again, taking it to the extreme. Of course, there is value in stability of the platform, but I think you provide that value by ensuring backward compatibility. You are free to get off the bus at C# 1.0 and just not move any further. For those people that really want to be more productive and want to build newer kinds of apps like SOA or whatever and get into more dynamic styles of programming—adaptable programs and more declarative styles of programming like we’re doing with LINQ—then you’ve got to evolve or get out of the way, or something else will replace you.
  • 38. Entrevista What do you suggest to become a better C# programmer? It’s hard. There are many good books out there on C# programming and I would encourage people to pick up one of the better books. I’m not going to start naming names here, but there are many good books out there that will help you become a better C# pro-grammer and help you better understand the .NET Framework. There are many things available online that also help. There are things like Codeplex. There’s a bunch of open source projects that you can grab and look at and learn from and so forth. To become a better programmer in general, one of the things that have helped me is to look at different styles of programming and different kinds of programming languages(…)
  • 39. Entrevista What’s facing us now and in five years? Concurrency is the big one right now. That thing is right in our face, and we’ve got to find solutions to that problem. One of my biggest challenges in the foreseeable future is having our team work that issue. Again, we’d like to do it in an evolutionary fashion, but how do you deal with the shared state problem and side effects without breaking all the existing code? We don’t know yet, but it very well may be that that concurrency is a big enough paradigm change that whole new languages are needed or whole new frameworks are needed. Although I don’t think we’re at that point yet. I think there’s a lot of ground that we can gain from making it possible for people to write APIs that internally are massively parallel and written by people that really understand a particular domain, be it transformations or numeric processing or signal processing or bit- maps or image manipulation. (…)
  • 40. Entrevista Does the object-oriented paradigm create problems? You know, it depends on what you group under the object-oriented paradigm. Polymorphism and encapsulation and inheritance are as such not a problem, although functional languages typically have a different view of how you do polymorphism with their algebraic data types. Aside from that, I think the biggest problem typically with object-oriented programming is that people do their object- oriented programming in a very imperative manner where objects encapsulate mutable state and you call methods or send messages to objects that cause them to modify themselves unbeknownst to other people that are referencing these objects. Now you end up with side effects that surprise you that you can’t analyze. In that sense object-oriented programming is a problem, but you could do object- oriented programming with immutable objects. Then you wouldn’t have these same problems. That’s kind of what functional programming languages are doing, for example.
  • 41. Entrevista Regarding your interest in functional programming, should computer science students study more math and experiment more with functional programming? Well, I certainly think that it is important to include functional programming in any computer science curricula. Whether you start with it that depends. I’m not sure that your very first introduction to programming should be functional programming, but I definitely think that it ought to be part of a curriculum.
  • 42. Entrevista What lessons should people learn from your experience? Well, if you look at the first product I worked on, Turbo Pascal, it was very much about not believing the traditional way of doing things. Don’t be afraid. Just because peo ple tell you it can’t be done, that doesn’t necessarily mean that it can’t be done. It just means that they can’t do it. I think it’s always fun to think outside of the box and try to find new solutions to existing problems. It was the only thing I wanted to do. I was very, very passionate about it. You have to have that passion to get really good at something, because that makes you put in the hours, and the hours are the real key. You need to put in a lot of work.