@StevenSiew - I think it’s funny because a very large number is interpreted as zero. This thing called humor has a Personal element to it. It wasn’t expected to me - in Python if you do ```2**100`` you get a long/BigInt of the appropriate size.
@dataDiver - I like that idea. sharing nifty and elegant solutions could lead to a good learning experience and show off the actual power of Julia (which is not in 1 liners).
Well, I thought it was funny, even though I knew about integer overflow. It’s an odd and interesting way to write zero. Seems to be in the spirit of the thread.
Tamas - you are missing nothing . Ever get really tired and work your way into a very weird solution to a problem? Because that’s what happened here hehehe. In retrospect your solution is obvious and definitely preferred!
f(v::Vector{T}, n=length(v), w=zeros(T, n)) where T = w
That one does nothing interesting, except showcasing the fact you can use both given value and parametric type in the definition of optional arguments. And this (somehow) brings me immense joy.