I like that the article calls then "functional data structures". Every time I call them by their real name (persistent data structures), _at least_ one person will get confused and think I'm talking about serialization to disk.
I consistently see the same problem. That is exactly why I use the word "functional".
Functional data structures in JavaScript with Mori
11–20 of 21 posts
Re: Functional data structures in JavaScript with Mori
#12Re: Functional data structures in JavaScript with Mori
#13This is great. I never understood why underscore/lo-dash doesn't have a `conj` or a `concat`. JavaScript's `push` mutates data which you'd think you'd want to avoid if you're using a functional library like underscore/lo-dash. `concat` makes sense to leave out when you consider that arrays already have a `concat` function. But if that's the reasoning, why did underscore/lo-dash include `size` and `max` and all those…
Re: Functional data structures in JavaScript with Mori
#14This is great. I never understood why underscore/lo-dash doesn't have a `conj` or a `concat`. JavaScript's `push` mutates data which you'd think you'd want to avoid if you're using a functional library like underscore/lo-dash. `concat` makes sense to leave out when you consider that arrays already have a `concat` function. But if that's the reasoning, why did underscore/lo-dash include `size` and `max` and all those…
One thing I never understood about - awful generalization - "real" functional languages is their fascination with terrible naming. What I mean is things like `car`, `cdr`, `conj` - words that are impossible to understand if you don't already know what they mean.
Re: Functional data structures in JavaScript with Mori
#15This is great. I never understood why underscore/lo-dash doesn't have a `conj` or a `concat`. JavaScript's `push` mutates data which you'd think you'd want to avoid if you're using a functional library like underscore/lo-dash. `concat` makes sense to leave out when you consider that arrays already have a `concat` function. But if that's the reasoning, why did underscore/lo-dash include `size` and `max` and all those…
One thing I never understood about - awful generalization - "real" functional languages is their fascination with terrible naming. What I mean is things like `car`, `cdr`, `conj` - words that are impossible to understand if you don't already know what they mean.
that's why some came up with these abbreviations.
Re: Functional data structures in JavaScript with Mori
#16This is great. I never understood why underscore/lo-dash doesn't have a `conj` or a `concat`. JavaScript's `push` mutates data which you'd think you'd want to avoid if you're using a functional library like underscore/lo-dash. `concat` makes sense to leave out when you consider that arrays already have a `concat` function. But if that's the reasoning, why did underscore/lo-dash include `size` and `max` and all those…
One thing I never understood about - awful generalization - "real" functional languages is their fascination with terrible naming. What I mean is things like `car`, `cdr`, `conj` - words that are impossible to understand if you don't already know what they mean.
Re: Functional data structures in JavaScript with Mori
#17Re: Functional data structures in JavaScript with Mori
#18This is great. I never understood why underscore/lo-dash doesn't have a `conj` or a `concat`. JavaScript's `push` mutates data which you'd think you'd want to avoid if you're using a functional library like underscore/lo-dash. `concat` makes sense to leave out when you consider that arrays already have a `concat` function. But if that's the reasoning, why did underscore/lo-dash include `size` and `max` and all those…
One thing I never understood about - awful generalization - "real" functional languages is their fascination with terrible naming. What I mean is things like `car`, `cdr`, `conj` - words that are impossible to understand if you don't already know what they mean.
Assembly is worse yet, and mixing C with assembly is basically a path to Lovecraftian madness: I really hate the way intrinsics look. Here's a real snippet from StackOverflow:
a_i = __mm_load_ps(&A[n*i+k]);
b_i = __mm_load_ps(&B[n*k+j]);
c_i = __mm_load_ps(&C[n*i+j]);
__m128d tmp1 = __mm_mul_ps(a_i,b_i);
__m128d tmp2 = __mm_hadd_ps(tmp1,tmp1);
__m128d tmp3 = __mm_add_ps(tmp2,tmp3);
__mm_store_ps(&C[n*i+j], tmp3)
You can also go too far in the other direction: see Java and especially Objective C.Re: Functional data structures in JavaScript with Mori
#19Earlier quoted context omitted.
One thing I never understood about - awful generalization - "real" functional languages is their fascination with terrible naming. What I mean is things like `car`, `cdr`, `conj` - words that are impossible to understand if you don't already know what they mean.
That's only lisp and particularly faithful derivatives (unfortunately including clojure). Haskell uses more natural names - head, tail, last.
Re: Functional data structures in JavaScript with Mori
#20Is there a current build anywhere or do I have to build it myself?