News for hackers. Stuff that matters.

lucasmreis

Re:Type Driven Domain Modelling, Part 2: Evolving Models with F# on Saturday February 04, 2017 @04:19PM (#13569122)
Really good, amazing example
Re:Type Driven Domain Modelling, Part 2: Evolving Models with F# on Saturday February 04, 2017 @01:07PM (#13568081)
It's ok! :)

So, if we only want to call a couple of animations and submit a form, I agree that a small script with three jQuery-style functions can do the job.

But that's rarely the case nowadays, in my experience. Almost every frontend project I came across professionally became a full application at some point.

There's the need of dealing with concurrent user interactions, online data requests to the server, non-traditional form behaviors, different routes...

Re:Type Driven Domain Modelling, Part 2: Evolving Models with F# on Saturday February 04, 2017 @08:38AM (#13566916)
From my research and experiments, I think that ML languages help a lot "getting the specs right". That means that you have more confidence that the code does what you want it to do.

I can see a lot of value for that in non-tech companies that correctness is crucial, like finance, insurance, health...

Re:Type Driven Domain Modelling, Part 2: Evolving Models with F# on Saturday February 04, 2017 @08:36AM (#13566905)
Thank you! I actually just removed createQty from the code. not only it had a typo, it was not being used anywhere beside the tests.

And, as some commenter on Disqus said, probably the right thing to do would be returning an Qty option from the function, and treating it properly.

I have no experience with Scheme, but already worked with Clojure - it was actually my "gateway" to functional programming languages, hehe!

Re:Type Driven Domain Modelling, Part 2: Evolving Models with F# on Saturday February 04, 2017 @08:34AM (#13566900)
Amazing - I'm gonna use this in the future :)
Re:Type Driven Domain Modelling, Part 2: Evolving Models with F# on Saturday February 04, 2017 @08:28AM (#13566893)
I disagree too. Frontend is getting more complex each day, and I find that functional programming languages help a lot with large projects. Frontend SPA's are crying for help with the exploding complexity :)
I only heard about it after researching F#. Not only Domain modelling, I also started hearing about Event Sourcing and CQR after learning F#.
Thank you! I'm getting into F# from a non-dotnet background: JS > Clojure > Elm > F# :)
Thanks for the compliment! :)

I agree that Clojure and Clojurescript are superior languages than Javascript. In fact, I had my first contact with CSP through those languages.

I like the React wrappers more than React itself, but I prefer Quiescent than Reagent, because I can use the framework described in the post.