4 ms·
Bravo for promoting functional programming and showing how it can be done in JavaScript. One issue concerns me, though: using strings to reference attributes. T
by facorreia 12y ago
Bravo for promoting functional programming and showing how it can be done in JavaScript. One issue concerns me, though: using strings to reference attributes. This makes static checking tools much less useful and can lead to difficult to find errors due to refactoring and typos.
- blablabla123 12y agoPromoting FP using SQL as an example for encoding business logic doesn't look to me like a nice example...
- CrossEye 12y agoThe idea was just to show that, contrary to many people's expectations, OOP is not the only widely used paradigm in business programming.
- CrossEye 12y agoThat, I think, is working with the grain in Javascript. It's extremely difficult to do static checking in the language in any case, because in the language `foo.bar` is just syntactic sugar for `foo['bar']`. A FP approach in JS is by its very nature going to be different from one in something more strongly typed like Haskell; this is actually one of the easier differences to swallow.