Remix.run Logo
hinkley 8 days ago

You explain the evolution of CPUs but then don’t explain Rank Polymorphism.

jph00 8 days ago | parent | next [-]

"Rank" means the number of dimensions of an array.

So "rank polymorphism" means being able to write expressions that work correctly regardless of how many dims the arrays involved have.

For example, in numpy you can write a function that handles both lists and matrices automatically, by taking advantage of broadcasting. (The J language takes this idea a lot further -- numpy is a fairly minimal implementation of the idea.)

hinkley 8 days ago | parent [-]

That just sounds like someone needing to feel smarter than 'multidimensional arrays' sounds. Which if you ask the average unskilled laborer, already sounds pretty damned fancy.

diziet_sma 8 days ago | parent [-]

It's not the same thing as multidimensional arrays though. You can have multidimensional arrays without rank polymorphism. Rank polymorphism makes working with multidimensional arrays much easier because you can write one function which works over input arrays with different shapes.

IncreasePosts 8 days ago | parent | prev [-]

It's just like polymorphism, only stinkier