Oct 31, 2008 at 4:57PMOptional parameters can be a good thing when considering their example. I remember automating some work in excel from c#. I'm stealing this example from here :
oChart.ChartWizard( oResizeRange, Excel.XlChartType.xl3DColumn, Missing.Value,[[ becomes ]]
Excel.XlRowCol.xlColumns, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value );
Source : oResizeRange,
Gallery : Excel.XlChartType.xl3DColumn,
PlotBy : Excel.XlRowCol.xlColumns
The new version could be a one-liner if i wanted it to be. I find the second version much easier to read, and you get to be explicit about your parameters. Intellisense was a lifesaver, I agree, but I do see the benefit of the new feature compared to just letting intellisense take over.
I was thinking during that video how depressing it was that my job will never be as cool as his. I felt like at the end you just wanted to stick it to me .
Where is the end of the video? (maybe he needed another mt dew).
With mention of functional stuff in c++ and boost in this video, I was recently encouraged to check out FC++. I'm sure many of you have ran across this already, but it seems on topic for those of you who haven't. http://www.cc.gatech.edu/~yannis/fc++/boostpaper/fcpp.html