Casting function vs New operator