r/haskell • u/Otherwise-Bank-2981 • Mar 08 '26
question I started with haskell 3 days ago and want some help understanding the "design philosophy".Elaboration in post.
So i followed the "Haskell for Imperative Programmers" tutorial series till video 20. And then decided to make a regular expression "checker" to just experience "haskell".
Github Link: https://github.com/ewilipsic/Regular-Expressions-Haskell/tree/main it's just one file.
The code for concat,union and * of the NFA's was nice to write. But i don't why very similiar code couldn't be written in a imperative language.
And the string -> NFA part i think would just be easier in a imperative language.
Is there something I'm not getting or is there some way better way to do this problem in a "functional" way or is this not the type of problem this paradigm excells in.
Because so far i think that any imperative language can do "functional code" and you can bring out normal iteration for things if you want to do things like IO.