Follow

Feeling a little weird about the way I'm using functional programming whilst dealing with object storage.

A lot of what I've learned/practiced deals with data in the form of arrays.

In the context of my current project, I built it over a year ago using Objects and iterating over objects using for...in loops.

Coming at it now I haven't changed the data as the API that I interact with appreciates Objects...but now I restructure objects into arrays a lot to preform functions on the data. [1/2]

· · Web · 1 · 0 · 0

I feel like my code wasn't pretty to begin with, but I'm sure this isn't much better.

Especially when objects need to be organized in a specific *order* to be restructured into arrays and consumed in a specific way.

From a readability standpoint, yes, I have many module methods that I can (and have) reused but I do feel like the number of loops/iterations have gone up. The code base is definitely larger, too.

I feel an ugly pull to go back on much refactoring and it sucks. I won't though, don't have time

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!