« first day (4270 days earlier)      last day (664 days later) » 

2:21 AM
I came across this sentence in the MSDN page on Interfaces, I wonder what it means:
> When a base type list contains a base class and interfaces, the base class must come first in the list.
What is a base type list?
 
 
3 hours later…
4:54 AM
[milleniumbug] I'm assuming it's the AbstractWhatever, IWhatever, ISomething part in class Whatever : AbstractWhatever, IWhatever, ISomething
[milleniumbug] the C# spec calls this thing "class base specification" but I guess it's not a common term to use
 
5:21 AM
Thank you!
 
 
5 hours later…
10:44 AM
@mr5 I mean windowed iteration
 
11:25 AM
it means you get a big IEnumerable and you want to iterate over it with multiple elements at the same time
 
mr5
ohhh
where is it useful?
why I haven't encountered it before
 
for example: numbers.windowed { abs(it[0] - it[1]) }
 
mr5
I think I have encountered chunked and partitioned, but not windowed
 
this will give you the differences between each neighbouring number
input: [42, 16, 71, -6]
output: [ 26, 55, 77 ]
 
mr5
it's guaranteed it[1] will not be out of range?
 
11:28 AM
depends
if you enable partial windows, it might
partial windows will include windows at the start or/and end that have lower than the desired size
or when you use size = 1, but that is silly afaik
keeping in mind, the above usage is equivalent to: numbers.windowed(size=2, partialWindows=false) { it -> abs(it[0] - it[1]) }
unfortunately, I cant really think of any real use case as neither of the 2 big projects I currently have opened actually use it
however, my C# utility library only gets functions that I needed at work, so I must have used it somewhere there
 

« first day (4270 days earlier)      last day (664 days later) »