Re:What Learning APL Taught Me About Python
by adalacelove on Wednesday August 16, 2023 @06:33PM
(#37154783)
If ages is a numpy array instead of a list:
[ Parent
| on HN ]
Re:What Learning APL Taught Me About Python
by dTal on Wednesday August 16, 2023 @06:50PM
(#37154922)
Numpy is something close to APL semantics with Python syntax. There's no doubt it was heavily inspired by APL. One could argue that numpy's popularity vindicates the array model pioneered by APL, while driving a nail in the coffin of "notation as a tool of thought", or APL's version of it at any rate. Array programming has never been more popular but there's no demand for APL syntax.
Re:What Learning APL Taught Me About Python
by adalacelove on Thursday August 17, 2023 @02:06AM
(#37157837)
I think the key to array programming success was due to the possibility of having fast interpreted languages for numerical computing. I'm very used to programming in array languages (Matlab, Python, Julia and even Mathematica has lot of vectorized ops) and still I think a lot in terms of for loops.
Re:What Learning APL Taught Me About Python
by sideshowb on Thursday August 17, 2023 @02:34AM
(#37157994)
This. Ideally we'd have jitted python loops be efficient. I love array syntax for simple examples but for more complex ops a loop is often clearer.
Re:What Learning APL Taught Me About Python
by TheRealKing on Thursday August 17, 2023 @11:56PM
(#37171242)
Numpy's vectorized syntax is inspired by Fortran.