4 ms·
Nice blog post, but: > You might have heard people say that functional programming is more academic, and real engineering is done in imperative style. Real En
by zz865 5y ago
Nice blog post, but:
> You might have heard people say that functional programming is more academic, and real engineering is done in imperative style.
Real Engineering is done in imperative style. There are very very few projects done in pure functional style. Sure it can be possible, there are always a few FP projects sprinkled around eg Spark has done great. But FP really is a niche specialty. It makes me think it just isn't the right tool for the job.
- 9wzYQbTYsAIc 5y agoIncluding the rest of the paragraph: > I’m going to show you that real engineering is functional, and I’m going to illustrate it using a computer game that is designed by engineers for engineers.
- klelatti 5y agoErlang is a functional language and was originally written to power telecoms systems. I think that very much counts as Real Engineering.
- wpietri 5y agoFor sure. Right tools for the job. Indeed, I'd say that a lot of the software development I do isn't Real Engineering. And that's fine! I have a lot of respect for the people who make 50-story skyscrapers. But a lot of the time what people need is a modest one-story apartment, a redone kitchen, a backyard doghouse. Or a movie set that just looks like an apartment.
- pjmlp 5y agoDigital circuits are full of FP, and that is real engineering.
- deleted 5y ago[deleted]
- carlmr 5y agoA lot of data engineering (pandas dataframes) is functional. GPU/shader programming is very functional. SQL queries are often quite functional.
- StreamBright 5y agoI dont think so. Half of the best practices of oop/imperative programming is coming from functional programming.
- kqr 5y agoLots of "real" engineering is based on algebraic manipulation, which has more in common with declarative/functional programming than with imperative/procedural programming. Not to mention that anything that goes through a spreadsheet relies on functional programming.
- FeepingCreature 5y agoPretty much all the domain code I write at work is in a functional style. Because D makes this easy and convenient, it's just what we end up using. Turns out dataflow is easier to follow than control flow.
- RHSeeger 5y ago> Real Engineering is done in imperative style From my experience, real engineering is done in a multi-paradigm style. Some functional, some oo, some imperative, etc. As a general rule, functional style is easier to reason about (and test) for smaller pieces of code (ie, pure functions, function composition, etc) but can be harder to reason about for the larger code base. As such, it's very common to see as many functions as possible be done in a functional style.. but the overall system include lots of non-fuctional things.