This post takes a more relatable and realistic yet complex problem to demonstrate how it is straightforward and concise to implement it in functional programming. It makes the case why functional programming matters; especially large and/or complex programs.
Guest post by Bahul Jain. In this post, he talks about addressing the performance implications of creating types everywhere. He explores AnyVal
and a light-weight library called Supertagged
to migitate it while still enjoying the benefits of types.
Guest post by Bahul Jain. In this post, he explains why types are essential for modeling data and operations in a meaningful way. He goes into detail about how types help clarify the purpose of data, making it easier for developers to understand, reason about, and work with.
A friend raised a great question after reading the last post:
If I am reading a list of books (List[Book]
) from the database, wouldn’t I lose the type information augmented by phantom type? If so, what good is phantom type if it can be used only for statically initializing (Book) instances.
One of the email providers I highlighted in the Degoogling post was Skiff, whihc is no longer alive. It was abruptly shut down in a day without notice, even to the patrons of their Discord community, in which I was a member. Skiff was acquired by Notion.
Making illegal states irrepresentable is a powerful technique in (functional) programming. The technique constrains certain operations to specific states, preventing your code from compiling if you attempt an invalid operation. The other less-than-ideal alternative is to check for valid states for operations at runtime.
SBT does not allow re-publishing artifacts with the same version unless it is a snapshot version. A snapshot version ends with the -SNAPSHOT
suffix, such as 0.1.0-SNAPSHOT
. Re-publishing, which involves running the sbt publish
or sbt publishLocal
command for the second time or more, is standard, especially for snapshot versions. If you attempt to re-publish a non-snapshot version, SBT will warn you with the following message and not publish the artifact.
More ...
Who can tell me what is the result of this expression?
"ะ" == "B"
You can use a repl of your choice, say Scala or Python, to evaluate the expression. Be prepared with an explanation for the result you see ๐
This post is the final part of the series on SBT. I hope I covered everything needed to break the ice and change the perspective on SBT. I have touched on most ingredients you need to write a decent fully-functional build definition. But there is a lot more to SBT.
In this post, I will discuss some things, nifty and a la carte, on SBT.
More ...I had planned to finish the series with this post. But Plugin s wouldn’t let me. I am going to show you how to write/publish a SBT project that is a Plugin, and I will show a nifty trick. It is not a trick, it is what SBT can do like a piece of pie. More ...