News for hackers. Stuff that matters.
Re:Brython – A Python 3 implementation for client-side web p... by linkdd on Monday July 06, 2020 @08:48AM (#23747294)
Functional programming constructs helps you write simple code faster, and clarify the algorithm.

It is easier to rearrange, to test and to reason about, but it is harder to read.

Once your fast-written code works, you obviously need to optimize it where it's needed. And if you map/filter/reduce is your bottleneck, just get rid of it obviously.

But I highly doubt it will be your bottleneck.

Nested anonymous function that rely on scope closure is THE way to truly encapsulate your data, example: https://pastebin.com/JrAP6yGP

IMHO, the factory pattern is a clearer/easier pattern than Javascript's classes/prototypes.

There are no comments on this comment yet.