SlideShare uma empresa Scribd logo
1 de 55
( ) versus ,

Damien Krotkine ( dams )
Parens versus Comma
Parens versus Comma
     or, what people say...
Parens versus Comma
              or, what people say...

or, a lame excuse to play with Keynote’s effects...
my @array = ( 1, 2, 3 )
my @array = ( 1, 2, 3 )
my @array = ( 1, 2, 3 )
my @array = ( 1, 2, 3 )



               ( 1, 2, 3 )


That’s a list, right ?
my @array = ( 1, 2, 3 )



               ( 1, 2, 3 )


That’s a list, right ?
But what makes it a list ?
People say
“ Oh that’s the parens”
“ The parentheses make it a list”
People say
“ Oh that’s the parens”
“ The parentheses make it a list”

People also say :
“ See, if you remove the parentheses, it doesn’t
work”
my @array = (1, 2, 3);
say “@array” # returns 1 2 3



             Yay !
my @array = 1, 2, 3 ;
say “@array” # returns 1



            Booh !
So people say

“ So, it must be the parentheses”

So now people say :

“parentheses are the list operator in Perl 5”
I say :

“Oh really ? ”
Let’s see... operators, what’s the list of Perl
operators ?
Let’s see... operators, what’s the list of Perl
operators ?

man perlop
->                       &
++ --                    | ^
**                       &&
! ~  + -                || //
=~ !~                    .. ...
* / % x                  ?:
+ - .                    = += -= *= etc.
<< >>                    , =>
< > <= >= lt gt le ge    not
== != <=> eq ne cmp ~~   and
                         xor
->                           &
++ --                        | ^
**                           &&
! ~  + -                    || //
=~ !~                        .. ...
* / % x                      ?:
+ - .                        = += -= *= etc.
<< >>                        , =>
< > <= >= lt gt le ge        not
== != <=> eq ne cmp ~~       and
                             xor

  There is no ( ) operator
->                           &
++ --                        | ^
**                           &&
! ~  + -                    || //
=~ !~                        .. ...
* / % x                      ?:
+ - .                        = += -= *= etc.
<< >>                        , =>
< > <= >= lt gt le ge        not
== != <=> eq ne cmp ~~       and
                             xor

  There is no ( ) operator
->                           &
++ --                        | ^
**                           &&
! ~  + -                    || //
=~ !~                        .. ...
* / % x                      ?:
+ - .                        = += -= *= etc.
<< >>                        , =>
< > <= >= lt gt le ge        not
== != <=> eq ne cmp ~~       and
                             xor

  There is no ( ) operator
  However there is a comma operator
->                           &
++ --                        | ^
**                           &&
! ~  + -                    || //
=~ !~                        .. ...
* / % x                      ?:
+ - .                        = += -= *= etc.
<< >>                        , =>
< > <= >= lt gt le ge        not
== != <=> eq ne cmp ~~       and
                             xor

  There is no ( ) operator
  However there is a comma operator
  , That’s the operator
The comma operator has a very low
precedence, but it’s still an operator

Parentheses ( ) are just there to modify
precedence
( 1, 2, 3 ) is a list
( 1, 2, 3 ) is a list

1, 2, 3 is also a list
my @list = 1, 2, 3
my @list = 1, 2, 3
So why doesn’t this work ?
my @list = 1, 2, 3
So why doesn’t this work ?

That’s because = has greater precedence
than ,
my @array = 1, 2, 3;
my @array = 1, 2, 3;
is really
my @array = 1, 2, 3;
is really
(my @array = 1), 2, 3;
my @array = 1, 2, 3;
is really
(my @array = 1), 2, 3;
And it’s also
And it’s also

( (my @array = 1), 2, 3 );
And it’s also

( (my @array = 1), 2, 3 );

So it’s really a list ! We are just not looking
at it completely when looking at @array
Why is it useful to know ?
It makes you realize you don’t need ( ) in
many situations
return 1, 2, 3;
return 1, 2, 3;
do_stuff or log(“error”), die;
return 1, 2, 3;
do_stuff or log(“error”), die;
my $self = bless { }, $class;
return 1, 2, 3;
do_stuff or log(“error”), die;
my $self = bless { }, $class;
etc.
return 1, 2, 3;
do_stuff or log(“error”), die;
my $self = bless { }, $class;
etc.
btw this doesn’t work
return 1, 2, 3;
do_stuff or log(“error”), die;
my $self = bless { }, $class;
etc.
btw this doesn’t work
do_stuff || log(“error”), die;
return 1, 2, 3;
do_stuff or log(“error”), die;
my $self = bless { }, $class;
etc.
btw this doesn’t work
do_stuff || log(“error”), die;
=> go learn your operators’ precedence
So please don’t say that ( ) is the Perl 5 list
operator: it is not

Give more love to the comma operator,
it’s often forgotten
So please don’t say that ( ) is the Perl 5 list
operator: it is not

Give more love to the comma operator,
it’s often forgotten


                 ♥
So please don’t say that ( ) is the Perl 5 list
operator: it is not

Give more love to the comma operator,
it’s often forgotten


                 ♥
And don’t listen to what people say...
Thanks




         Damien Krotkine ( dams )

Mais conteúdo relacionado

Semelhante a Comma versus list

2 2. operators
2 2. operators2 2. operators
2 2. operators웅식 전
 
Python quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fuclimatewarrior
 
Perl 6 in Context
Perl 6 in ContextPerl 6 in Context
Perl 6 in Contextlichtkind
 
From Javascript To Haskell
From Javascript To HaskellFrom Javascript To Haskell
From Javascript To Haskellujihisa
 
F# Presentation
F# PresentationF# Presentation
F# Presentationmrkurt
 
Ruby Language - A quick tour
Ruby Language - A quick tourRuby Language - A quick tour
Ruby Language - A quick touraztack
 
Refactor like a boss
Refactor like a bossRefactor like a boss
Refactor like a bossgsterndale
 
Hacking parse.y (RubyKansai38)
Hacking parse.y (RubyKansai38)Hacking parse.y (RubyKansai38)
Hacking parse.y (RubyKansai38)ujihisa
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1Dave Cross
 
Data Pipelines in Swift
Data Pipelines in SwiftData Pipelines in Swift
Data Pipelines in SwiftJason Larsen
 
Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangSean Cribbs
 
20191116 custom operators in swift
20191116 custom operators in swift20191116 custom operators in swift
20191116 custom operators in swiftChiwon Song
 
Python language data types
Python language data typesPython language data types
Python language data typesHarry Potter
 
Python language data types
Python language data typesPython language data types
Python language data typesHoang Nguyen
 
Python language data types
Python language data typesPython language data types
Python language data typesYoung Alista
 

Semelhante a Comma versus list (20)

2 2. operators
2 2. operators2 2. operators
2 2. operators
 
Python quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fu
 
Perl 6 in Context
Perl 6 in ContextPerl 6 in Context
Perl 6 in Context
 
operators.ppt
operators.pptoperators.ppt
operators.ppt
 
From Javascript To Haskell
From Javascript To HaskellFrom Javascript To Haskell
From Javascript To Haskell
 
Operator precedence
Operator precedenceOperator precedence
Operator precedence
 
F# Presentation
F# PresentationF# Presentation
F# Presentation
 
Ruby Language - A quick tour
Ruby Language - A quick tourRuby Language - A quick tour
Ruby Language - A quick tour
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
Refactor like a boss
Refactor like a bossRefactor like a boss
Refactor like a boss
 
Python Workshop
Python  Workshop Python  Workshop
Python Workshop
 
Hacking parse.y (RubyKansai38)
Hacking parse.y (RubyKansai38)Hacking parse.y (RubyKansai38)
Hacking parse.y (RubyKansai38)
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1
 
Scala 2 + 2 > 4
Scala 2 + 2 > 4Scala 2 + 2 > 4
Scala 2 + 2 > 4
 
Data Pipelines in Swift
Data Pipelines in SwiftData Pipelines in Swift
Data Pipelines in Swift
 
Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In Erlang
 
20191116 custom operators in swift
20191116 custom operators in swift20191116 custom operators in swift
20191116 custom operators in swift
 
Python language data types
Python language data typesPython language data types
Python language data types
 
Python language data types
Python language data typesPython language data types
Python language data types
 
Python language data types
Python language data typesPython language data types
Python language data types
 

Mais de Damien Krotkine

Stockage et analyse temps réel d'événements avec Riak chez Booking.com
Stockage et analyse temps réel d'événements avec Riak chez Booking.comStockage et analyse temps réel d'événements avec Riak chez Booking.com
Stockage et analyse temps réel d'événements avec Riak chez Booking.comDamien Krotkine
 
Using Riak for Events storage and analysis at Booking.com
Using Riak for Events storage and analysis at Booking.comUsing Riak for Events storage and analysis at Booking.com
Using Riak for Events storage and analysis at Booking.comDamien Krotkine
 

Mais de Damien Krotkine (6)

Stockage et analyse temps réel d'événements avec Riak chez Booking.com
Stockage et analyse temps réel d'événements avec Riak chez Booking.comStockage et analyse temps réel d'événements avec Riak chez Booking.com
Stockage et analyse temps réel d'événements avec Riak chez Booking.com
 
Using Riak for Events storage and analysis at Booking.com
Using Riak for Events storage and analysis at Booking.comUsing Riak for Events storage and analysis at Booking.com
Using Riak for Events storage and analysis at Booking.com
 
Riak introduction
Riak introductionRiak introduction
Riak introduction
 
Message passing
Message passingMessage passing
Message passing
 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocket
 
Curses::Toolkit
Curses::ToolkitCurses::Toolkit
Curses::Toolkit
 

Último

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Comma versus list

  • 1. ( ) versus , Damien Krotkine ( dams )
  • 3. Parens versus Comma or, what people say...
  • 4. Parens versus Comma or, what people say... or, a lame excuse to play with Keynote’s effects...
  • 5. my @array = ( 1, 2, 3 )
  • 6. my @array = ( 1, 2, 3 )
  • 7. my @array = ( 1, 2, 3 )
  • 8. my @array = ( 1, 2, 3 ) ( 1, 2, 3 ) That’s a list, right ?
  • 9. my @array = ( 1, 2, 3 ) ( 1, 2, 3 ) That’s a list, right ? But what makes it a list ?
  • 10. People say “ Oh that’s the parens” “ The parentheses make it a list”
  • 11. People say “ Oh that’s the parens” “ The parentheses make it a list” People also say : “ See, if you remove the parentheses, it doesn’t work”
  • 12. my @array = (1, 2, 3); say “@array” # returns 1 2 3 Yay !
  • 13. my @array = 1, 2, 3 ; say “@array” # returns 1 Booh !
  • 14. So people say “ So, it must be the parentheses” So now people say : “parentheses are the list operator in Perl 5”
  • 15. I say : “Oh really ? ”
  • 16.
  • 17. Let’s see... operators, what’s the list of Perl operators ?
  • 18. Let’s see... operators, what’s the list of Perl operators ? man perlop
  • 19.
  • 20. -> & ++ -- | ^ ** && ! ~ + - || // =~ !~ .. ... * / % x ?: + - . = += -= *= etc. << >> , => < > <= >= lt gt le ge not == != <=> eq ne cmp ~~ and xor
  • 21. -> & ++ -- | ^ ** && ! ~ + - || // =~ !~ .. ... * / % x ?: + - . = += -= *= etc. << >> , => < > <= >= lt gt le ge not == != <=> eq ne cmp ~~ and xor There is no ( ) operator
  • 22. -> & ++ -- | ^ ** && ! ~ + - || // =~ !~ .. ... * / % x ?: + - . = += -= *= etc. << >> , => < > <= >= lt gt le ge not == != <=> eq ne cmp ~~ and xor There is no ( ) operator
  • 23. -> & ++ -- | ^ ** && ! ~ + - || // =~ !~ .. ... * / % x ?: + - . = += -= *= etc. << >> , => < > <= >= lt gt le ge not == != <=> eq ne cmp ~~ and xor There is no ( ) operator However there is a comma operator
  • 24. -> & ++ -- | ^ ** && ! ~ + - || // =~ !~ .. ... * / % x ?: + - . = += -= *= etc. << >> , => < > <= >= lt gt le ge not == != <=> eq ne cmp ~~ and xor There is no ( ) operator However there is a comma operator , That’s the operator
  • 25. The comma operator has a very low precedence, but it’s still an operator Parentheses ( ) are just there to modify precedence
  • 26.
  • 27. ( 1, 2, 3 ) is a list
  • 28. ( 1, 2, 3 ) is a list 1, 2, 3 is also a list
  • 29.
  • 30. my @list = 1, 2, 3
  • 31. my @list = 1, 2, 3 So why doesn’t this work ?
  • 32. my @list = 1, 2, 3 So why doesn’t this work ? That’s because = has greater precedence than ,
  • 33.
  • 34. my @array = 1, 2, 3;
  • 35. my @array = 1, 2, 3; is really
  • 36. my @array = 1, 2, 3; is really (my @array = 1), 2, 3;
  • 37. my @array = 1, 2, 3; is really (my @array = 1), 2, 3;
  • 38.
  • 40. And it’s also ( (my @array = 1), 2, 3 );
  • 41. And it’s also ( (my @array = 1), 2, 3 ); So it’s really a list ! We are just not looking at it completely when looking at @array
  • 42. Why is it useful to know ?
  • 43. It makes you realize you don’t need ( ) in many situations
  • 44.
  • 46. return 1, 2, 3; do_stuff or log(“error”), die;
  • 47. return 1, 2, 3; do_stuff or log(“error”), die; my $self = bless { }, $class;
  • 48. return 1, 2, 3; do_stuff or log(“error”), die; my $self = bless { }, $class; etc.
  • 49. return 1, 2, 3; do_stuff or log(“error”), die; my $self = bless { }, $class; etc. btw this doesn’t work
  • 50. return 1, 2, 3; do_stuff or log(“error”), die; my $self = bless { }, $class; etc. btw this doesn’t work do_stuff || log(“error”), die;
  • 51. return 1, 2, 3; do_stuff or log(“error”), die; my $self = bless { }, $class; etc. btw this doesn’t work do_stuff || log(“error”), die; => go learn your operators’ precedence
  • 52. So please don’t say that ( ) is the Perl 5 list operator: it is not Give more love to the comma operator, it’s often forgotten
  • 53. So please don’t say that ( ) is the Perl 5 list operator: it is not Give more love to the comma operator, it’s often forgotten ♥
  • 54. So please don’t say that ( ) is the Perl 5 list operator: it is not Give more love to the comma operator, it’s often forgotten ♥ And don’t listen to what people say...
  • 55. Thanks Damien Krotkine ( dams )

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n