SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
http://golang.org
Thursday, July 22, 2010
Public Static Void
       Rob Pike
       OSCON
       July 22, 2010




   http://golang.org
Thursday, July 22, 2010
History
            I'm always delighted by the light touch and stillness of early
            programming languages. Not much text; a lot gets done. Old
            programs read like quiet conversations between a well-
            spoken research worker and a well-studied mechanical
            colleague, not as a debate with a compiler. Who'd have
            guessed sophistication bought such noise?

            - Dick Gabriel




       2


Thursday, July 22, 2010
Sophistication
            If more than one function is selected, any function template
            specializations in the set are eliminated if the set also
            contains a non-template function, and any given function
            template specialization F1 is eliminated if the set contains a
            second function template specialization whose function
            template is more specialized than the function template of F1
            according to the partial ordering rules of 14.5.6.2. After such
            eliminations, if any, there shall remain exactly one selected
            function.
            (C++0x, §13.4 [4])




       3


Thursday, July 22, 2010
Sophistication
            Which Boost templated pointer type should I use?

                 -        linked_ptr
                 -        scoped_ptr
                 -        shared_ptr
                 -        smart_ptr
                 -        weak_ptr
                 -        intrusive_ptr
                 -        exception_ptr




       4


Thursday, July 22, 2010
Noise
            public static <I, O> ListenableFuture<O> chain
            (ListenableFuture<I> input, Function<? super I, ?
            extends ListenableFuture<? extends O>> function)
            dear god make it stop

               - a recently observed chat status


            foo::Foo *myFoo = new foo::Foo(foo::FOO_INIT)
               - but in the original Foo was a longer word




       5


Thursday, July 22, 2010
How did we get here?
            A personal analysis:

            1) C and Unix became dominant in research.

            2) The desire for a higher-level language led to C++, which
            grafted the Simula style of object-oriented programming onto
            C. It was a poor fit but since it compiled to C it brought high-
            level programming to Unix.

            3) C++ became the language of choice in parts of industry
            and in many research universities.

            4) Java arose as a clearer, stripped-down C++.

            5) By the late 1990s, a teaching language was needed that
            seemed relevant, and Java was chosen.
       6


Thursday, July 22, 2010
Programming became too hard
            These languages are hard to use.

            They are subtle, intricate, and verbose.

            Their standard model is oversold, and we respond with add-
            on models such as "patterns".

            (Norvig: patterns are a demonstration of weakness in a
            language.)




       7


Thursday, July 22, 2010
Programming as bureaucracy
            Every step in the program must be justified to the compiler.
            The repetition in
                     foo::Foo *myFoo = new foo::Foo(foo::FOO_INIT)
            is like filling out a form in triplicate.

            Repetition became a placeholder for safety.
            Programs end up looking like credit card applications.




       8


Thursday, July 22, 2010
Bureaucracy is institutionalized
            static {
                defaultPorts.put("http",         new Integer(80));
                defaultPorts.put("shttp",        new Integer(80));
                defaultPorts.put("https",        new Integer(443)); // ...
                usesGenericSyntax.put("http",    Boolean.TRUE);
                usesGenericSyntax.put("https",   Boolean.TRUE);
                usesGenericSyntax.put("shttp",   Boolean.TRUE);    // ...
            }

            private static final boolean pathsEqual(String p1, String p2)


            This is the look of industrial programming.
            Why do we type so much?
            Why is this style not bothersome to programmers?
            Why don’t the languages help?

            Yet somehow... these languages are successful and vital.

       9


Thursday, July 22, 2010
A reaction
            The inherent clumsiness of the main languages has caused
            a reaction.

            A number of successful simpler languages (Python, Ruby,
            Lua, JavaScript, Erlang, ...) have become popular, in part as
            a rejection of the standard languages.

            Some beautiful and rigorous languages designed by domain
            experts (Scala, Haskell, ...) have also arisen, although they
            are not as widely adopted.

            So despite the standard model, other approaches are
            popular and there are signs of a growth in "outsider"
            languages, a renaissance of language invention.


       10


Thursday, July 22, 2010
A confusion
            The standard languages (Java, C++) are statically typed.

            Most outsider languages (Ruby, Python, JavaScript) are
            interpreted and dynamically typed.

            Perhaps as a result, some programmers have confused
            "ease of use" with interpretation and dynamic typing.

            This confusion arose because of how we got here: grafting
            an orthodoxy onto a language that couldn't support it cleanly.

            The world has split into a false dichotomy: nice, interpreted,
            dynamic versus ugly, compiled, static.

            Time to put things right.
       11


Thursday, July 22, 2010
The good
            The standard languages are very strong: type-safe, effective,
            efficient.

            In the hands of experts, they are great.

            Huge systems and large companies are built on them.

            In practice they work well for large scale programming: big
            programs, many programmers.




       12


Thursday, July 22, 2010
The bad
            The standard languages are hard to use.

            Compilers are slow and fussy. Binaries are huge.

            Effective work needs language-aware tools, distributed
            compilation farms, ...

            Many programmers prefer to avoid them.

            These languages are at least 10 years old and poorly
            adapted to the current computing environment: clouds of
            networked multicore CPUs.




       13


Thursday, July 22, 2010
Flight to the suburbs
            This is partly why Python et al. have become so popular:
            They don't have much of the "bad".

                 - dynamically typed (fewer noisy keystrokes)
                 - interpreted (no compiler to wait for)
                 - good tools (interpreters make things easier)

            But they also don't have the "good". They are

                 - slow
                 - not type-safe (static errors occur at runtime)
                 - very poor at scale

            And they're also not very modern.


       14


Thursday, July 22, 2010
A niche
            There is a niche to be filled: a language that has the good,
            avoids the bad, and is suitable to modern computing
            infrastructure:

                 - comprehensible
                 - statically typed
                 - light on the page
                 - fast to work in
                 - scales well
                 - doesn't require tools, but supports them well
                 - good at networking and multiprocessing




       15


Thursday, July 22, 2010
Go
            An attempt to fill the niche




       16


Thursday, July 22, 2010
The target
            Go aims to combine the safety and performance of a
            statically typed compiled language with the expressiveness
            and convenience of a dynamically typed interpreted
            language.

            It also aims to be suitable for modern systems - large scale -
            programming.




       17


Thursday, July 22, 2010
How does Go fill the niche?
            General purpose

            Concise syntax

            Expressive type system

            Concurrency

            Garbage collection

            Fast compilation

            Efficient execution


            And of course... Open Source
       18


Thursday, July 22, 2010
More details in my next talk
            And at http://golang.org




       19


Thursday, July 22, 2010
http://golang.org
Thursday, July 22, 2010
Public Static Void
       Rob Pike
       OSCON
       July 22, 2010




   http://golang.org
Thursday, July 22, 2010

Contenu connexe

Dernier

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

En vedette

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

En vedette (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Public Static Void

  • 2. Public Static Void Rob Pike OSCON July 22, 2010 http://golang.org Thursday, July 22, 2010
  • 3. History I'm always delighted by the light touch and stillness of early programming languages. Not much text; a lot gets done. Old programs read like quiet conversations between a well- spoken research worker and a well-studied mechanical colleague, not as a debate with a compiler. Who'd have guessed sophistication bought such noise? - Dick Gabriel 2 Thursday, July 22, 2010
  • 4. Sophistication If more than one function is selected, any function template specializations in the set are eliminated if the set also contains a non-template function, and any given function template specialization F1 is eliminated if the set contains a second function template specialization whose function template is more specialized than the function template of F1 according to the partial ordering rules of 14.5.6.2. After such eliminations, if any, there shall remain exactly one selected function. (C++0x, §13.4 [4]) 3 Thursday, July 22, 2010
  • 5. Sophistication Which Boost templated pointer type should I use? - linked_ptr - scoped_ptr - shared_ptr - smart_ptr - weak_ptr - intrusive_ptr - exception_ptr 4 Thursday, July 22, 2010
  • 6. Noise public static <I, O> ListenableFuture<O> chain (ListenableFuture<I> input, Function<? super I, ? extends ListenableFuture<? extends O>> function) dear god make it stop - a recently observed chat status foo::Foo *myFoo = new foo::Foo(foo::FOO_INIT) - but in the original Foo was a longer word 5 Thursday, July 22, 2010
  • 7. How did we get here? A personal analysis: 1) C and Unix became dominant in research. 2) The desire for a higher-level language led to C++, which grafted the Simula style of object-oriented programming onto C. It was a poor fit but since it compiled to C it brought high- level programming to Unix. 3) C++ became the language of choice in parts of industry and in many research universities. 4) Java arose as a clearer, stripped-down C++. 5) By the late 1990s, a teaching language was needed that seemed relevant, and Java was chosen. 6 Thursday, July 22, 2010
  • 8. Programming became too hard These languages are hard to use. They are subtle, intricate, and verbose. Their standard model is oversold, and we respond with add- on models such as "patterns". (Norvig: patterns are a demonstration of weakness in a language.) 7 Thursday, July 22, 2010
  • 9. Programming as bureaucracy Every step in the program must be justified to the compiler. The repetition in foo::Foo *myFoo = new foo::Foo(foo::FOO_INIT) is like filling out a form in triplicate. Repetition became a placeholder for safety. Programs end up looking like credit card applications. 8 Thursday, July 22, 2010
  • 10. Bureaucracy is institutionalized static { defaultPorts.put("http", new Integer(80)); defaultPorts.put("shttp", new Integer(80)); defaultPorts.put("https", new Integer(443)); // ... usesGenericSyntax.put("http", Boolean.TRUE); usesGenericSyntax.put("https", Boolean.TRUE); usesGenericSyntax.put("shttp", Boolean.TRUE); // ... } private static final boolean pathsEqual(String p1, String p2) This is the look of industrial programming. Why do we type so much? Why is this style not bothersome to programmers? Why don’t the languages help? Yet somehow... these languages are successful and vital. 9 Thursday, July 22, 2010
  • 11. A reaction The inherent clumsiness of the main languages has caused a reaction. A number of successful simpler languages (Python, Ruby, Lua, JavaScript, Erlang, ...) have become popular, in part as a rejection of the standard languages. Some beautiful and rigorous languages designed by domain experts (Scala, Haskell, ...) have also arisen, although they are not as widely adopted. So despite the standard model, other approaches are popular and there are signs of a growth in "outsider" languages, a renaissance of language invention. 10 Thursday, July 22, 2010
  • 12. A confusion The standard languages (Java, C++) are statically typed. Most outsider languages (Ruby, Python, JavaScript) are interpreted and dynamically typed. Perhaps as a result, some programmers have confused "ease of use" with interpretation and dynamic typing. This confusion arose because of how we got here: grafting an orthodoxy onto a language that couldn't support it cleanly. The world has split into a false dichotomy: nice, interpreted, dynamic versus ugly, compiled, static. Time to put things right. 11 Thursday, July 22, 2010
  • 13. The good The standard languages are very strong: type-safe, effective, efficient. In the hands of experts, they are great. Huge systems and large companies are built on them. In practice they work well for large scale programming: big programs, many programmers. 12 Thursday, July 22, 2010
  • 14. The bad The standard languages are hard to use. Compilers are slow and fussy. Binaries are huge. Effective work needs language-aware tools, distributed compilation farms, ... Many programmers prefer to avoid them. These languages are at least 10 years old and poorly adapted to the current computing environment: clouds of networked multicore CPUs. 13 Thursday, July 22, 2010
  • 15. Flight to the suburbs This is partly why Python et al. have become so popular: They don't have much of the "bad". - dynamically typed (fewer noisy keystrokes) - interpreted (no compiler to wait for) - good tools (interpreters make things easier) But they also don't have the "good". They are - slow - not type-safe (static errors occur at runtime) - very poor at scale And they're also not very modern. 14 Thursday, July 22, 2010
  • 16. A niche There is a niche to be filled: a language that has the good, avoids the bad, and is suitable to modern computing infrastructure: - comprehensible - statically typed - light on the page - fast to work in - scales well - doesn't require tools, but supports them well - good at networking and multiprocessing 15 Thursday, July 22, 2010
  • 17. Go An attempt to fill the niche 16 Thursday, July 22, 2010
  • 18. The target Go aims to combine the safety and performance of a statically typed compiled language with the expressiveness and convenience of a dynamically typed interpreted language. It also aims to be suitable for modern systems - large scale - programming. 17 Thursday, July 22, 2010
  • 19. How does Go fill the niche? General purpose Concise syntax Expressive type system Concurrency Garbage collection Fast compilation Efficient execution And of course... Open Source 18 Thursday, July 22, 2010
  • 20. More details in my next talk And at http://golang.org 19 Thursday, July 22, 2010
  • 22. Public Static Void Rob Pike OSCON July 22, 2010 http://golang.org Thursday, July 22, 2010