Click here to Skip to main content
16,016,568 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: Stroustrup: Why the 35-year-old C++ still dominates 'real' dev Pin
Shao Voon Wong17-Aug-14 22:00
mvaShao Voon Wong17-Aug-14 22:00 
GeneralRe: Stroustrup: Why the 35-year-old C++ still dominates 'real' dev Pin
LloydA11117-Aug-14 23:41
LloydA11117-Aug-14 23:41 
GeneralRe: Stroustrup: Why the 35-year-old C++ still dominates 'real' dev Pin
ed welch18-Aug-14 8:45
ed welch18-Aug-14 8:45 
NewsPattern Matching in C# 6 and VB 12 Pin
Kent Sharkey17-Aug-14 16:23
staffKent Sharkey17-Aug-14 16:23 
GeneralRe: Pattern Matching in C# 6 and VB 12 Pin
Dan Neely18-Aug-14 3:58
Dan Neely18-Aug-14 3:58 
GeneralRe: Pattern Matching in C# 6 and VB 12 Pin
Rob Grainger20-Aug-14 3:53
Rob Grainger20-Aug-14 3:53 
GeneralRe: Pattern Matching in C# 6 and VB 12 Pin
Dan Neely21-Aug-14 2:35
Dan Neely21-Aug-14 2:35 
GeneralRe: Pattern Matching in C# 6 and VB 12 Pin
Rob Grainger23-Aug-14 6:58
Rob Grainger23-Aug-14 6:58 
The last example I gave is more typical - the small trivial ones are unsurprisingly trivial (although anything that helps avoid null reference exceptions neatly is not really trivial, as that remains one of the major causes of software defects). The last example illustrates the true use of pattern matching more.

What is achieved is a little embedded Domain Specific Language (DSL) for expressions, along with a mechanism for simplifying those expressions, so that (x + 0) gets simplified to just (x). This is incredibly useful in many areas. Common uses are expression parsing, walking trees without requiring awkward visitor classes, filtering data, differentiating and integrating expressions. While all this can be achieved without PM, it typically reduces 100's of lines of code to 10's (with the corresponding decrease of chances of bugs).

I remember being similarly bemused when I started learning PM, but I encourage you to persevere. It is one of the most useful new techniques I have learned in the last decade. I'm looking forward to the extensions immensely, even if they are nobbled compared to the power of those presented in functional languages and Haskell particularly.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.

GeneralRe: Pattern Matching in C# 6 and VB 12 Pin
Bernhard Hiller19-Aug-14 0:37
Bernhard Hiller19-Aug-14 0:37 
GeneralRe: Pattern Matching in C# 6 and VB 12 Pin
Dan Neely19-Aug-14 2:32
Dan Neely19-Aug-14 2:32 
GeneralRe: Pattern Matching in C# 6 and VB 12 Pin
Bernhard Hiller19-Aug-14 6:48
Bernhard Hiller19-Aug-14 6:48 
GeneralRe: Pattern Matching in C# 6 and VB 12 Pin
Rob Grainger20-Aug-14 3:54
Rob Grainger20-Aug-14 3:54 
NewsDirectX 12 - High Performance and High Power Savings Pin
Kent Sharkey17-Aug-14 16:22
staffKent Sharkey17-Aug-14 16:22 
NewsWindows as a Service gets name-checked, again, by Microsoft Pin
Kent Sharkey17-Aug-14 16:19
staffKent Sharkey17-Aug-14 16:19 
NewsMicrosoft to deliver Windows 'Threshold' tech preview around late September Pin
Kent Sharkey17-Aug-14 16:18
staffKent Sharkey17-Aug-14 16:18 
NewsMicrosoft acknowledges issues in Windows 8.1 August Update, asks users to uninstall some update files Pin
Kent Sharkey17-Aug-14 16:17
staffKent Sharkey17-Aug-14 16:17 
NewsSmartphone at 20: IBM Simon becomes museum exhibit Pin
JMK-NI16-Aug-14 9:36
professionalJMK-NI16-Aug-14 9:36 
NewsPop-up ad creator: 'I'm sorry' PinPopular
Ravi Bhavnani15-Aug-14 9:12
professionalRavi Bhavnani15-Aug-14 9:12 
AnswerRe: Pop-up ad creator: 'I'm sorry' Pin
Afzaal Ahmad Zeeshan15-Aug-14 9:56
professionalAfzaal Ahmad Zeeshan15-Aug-14 9:56 
GeneralRe: Pop-up ad creator: 'I'm sorry' Pin
Michael Gazonda15-Aug-14 10:07
professionalMichael Gazonda15-Aug-14 10:07 
GeneralRe: Pop-up ad creator: 'I'm sorry' Pin
Jeremy Falcon15-Aug-14 10:18
professionalJeremy Falcon15-Aug-14 10:18 
GeneralRe: Pop-up ad creator: 'I'm sorry' Pin
Michael Gazonda15-Aug-14 10:37
professionalMichael Gazonda15-Aug-14 10:37 
GeneralRe: Pop-up ad creator: 'I'm sorry' Pin
Jeremy Falcon15-Aug-14 10:39
professionalJeremy Falcon15-Aug-14 10:39 
GeneralRe: Pop-up ad creator: 'I'm sorry' Pin
Michael Gazonda15-Aug-14 10:44
professionalMichael Gazonda15-Aug-14 10:44 
GeneralRe: Pop-up ad creator: 'I'm sorry' Pin
Jeremy Falcon15-Aug-14 11:03
professionalJeremy Falcon15-Aug-14 11:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.