3 ms·
Does Haskel support broadcast things without libraries/extensions? That you can abstract broadcasting operations seems a silly argument. Of course you can wri
by taeric 3y ago
Does Haskel support broadcast things without libraries/extensions?
That you can abstract broadcasting operations seems a silly argument. Of course you can write a program that will do the same things in both. But in neither Haskel nor Python is `[1, 2, 3] * 4` a valid statement without a lot of work. (Well, to be fair, it is valid in Python, but not in the expected sense for what we are discussing here...)
- thesz 3y agoDefine "a lot of work." In Haskell you need to define a type and implement two classes (IsList and Num). Then you will have the ability to use [1,2,3] * 4 and get your [4,8,12]. Is it a lot of work? It does not seem like that for me.