On Wednesday, April 30, 2014 2:09:45 PM UTC+1, Patrick O'Leary wrote: > > On Wednesday, April 30, 2014 7:52:16 AM UTC-5, Oliver Woodford wrote: >> >> Is that correct? If not, what really is the correct way to constrain >> input arrays to be homogenous? >> > > The tendency in Julia is to embrace that it's a dynamic language, and not > excessively type constrain inputs. While I don't think there's a way to do > exactly what you want, why do you want to do it? > > When my function will be a lot slower if you pass in a heterogeneous array, and I want to avoid programmers accidentally and obliviously doing that. Now, I could convert heterogeneous arrays to homogeneous ones within the function, but the Julia style guide<http://julia.readthedocs.org/en/latest/manual/style-guide/#handle-excess-argument-diversity-in-the-caller>very sensibly counsels against that.
- Re: [julia-users] Re: Array/Cell - a useful dist... Stefan Karpinski
- Re: [julia-users] Re: Array/Cell - a useful ... Matt Bauman
- [julia-users] Array/Cell - a useful distinction, or n... Jason Merrill
- [julia-users] Re: Array/Cell - a useful distinct... Oliver Woodford
- [julia-users] Re: Array/Cell - a useful dist... Jason Merrill
- [julia-users] Re: Array/Cell - a useful ... Tomas Lycken
- Re: [julia-users] Re: Array/Cell - a... Tim Holy
- Re: [julia-users] Re: Array/Cel... Tomas Lycken
- Re: [julia-users] Re: Array/Cel... Oliver Woodford
- Re: [julia-users] Re: Array... Patrick O'Leary
- Re: [julia-users] Re: Array... Oliver Woodford
- Re: [julia-users] Re: Array... Patrick O'Leary
- Re: [julia-users] Re: Array... Oliver Woodford
- Re: [julia-users] Re: Array... Stefan Karpinski
- Re: [julia-users] Re: Array... Simon Kornblith
- Re: [julia-users] Re: Array... Andreas Noack Jensen
- Re: [julia-users] Re: Array... Stefan Karpinski
- Re: [julia-users] Re: Array... Ivar Nesje
- Re: [julia-users] Re: Array... Patrick O'Leary
- Re: [julia-users] Re: Array... Ivar Nesje
- Re: [julia-users] Re: Array... Patrick O'Leary
