DEV Community

Discussion on: Programming Paradigm

Collapse
 
dexygen profile image
George Jempty

Not to be presumptuous but maybe the following post of mine from 12 months ago will help demonstrate how to institute a system that follows the declarative paradigm (rather than for instance just using what SQL hands you): dev.to/dexygen/accidentally-declar...

Collapse
 
matheusgomes062 profile image
Matheus Gomes 👨‍💻

Fantastic way of mapping input fields. Indeed a much better way, although you started with something similar, using sql to explain. Thanks for the post!

Collapse
 
dexygen profile image
George Jempty

Thanks, of course now with more modern frameworks (that was a jQuery application) things could probably be done reactively.

Thread Thread
 
matheusgomes062 profile image
Matheus Gomes 👨‍💻

That what i was thinking, i did something similar with vuejs. It's a lot easier.

Thread Thread
 
dexygen profile image
George Jempty

I look forward to your upcoming articles. Beware, when posting about functional programming, sometimes chaining methods such as map and filter can hurt performance, as they essentially iterate over the same data set over and over. It's very rare that I've met such a situation that I couldn't address with reduce, and I also did a jsperf comparing my code to the code relying on chaining, and mine was nearly twice as fast.

Thread Thread
 
matheusgomes062 profile image
Matheus Gomes 👨‍💻

I will make sure to study a lot so i don't make any mistakes!

Thread Thread
 
dexygen profile image
George Jempty

Don't worry, everybody makes mistakes. Actually setting out to teach is a very good way to learn. By the way, are you "following" me? I followed you, if you follow back we can have private discussions, in fact I want to tell you who my 2 favorite programmers from Brazil are