Perhaps another reason why some coders dislike the ternary operator, this little one liner that is asked of you to review hides a bug. Can you spot it?
Did you know that you can prove a theorem with Scala? Starting from the Curry-Howard isomorphism, we can turn logical statements into pure Scala code with only a rudimentary knowledge of Scala. Follow along with the exercise for insights into the patterns the compiler forces you into and how Scala works.
If you are coming from a web development background, ReasonML is a great way to get into functional programming and learn about module functors. They are like higher-order functions for modules and can generate new modules from existing ones. Module functors are packed with power, but use them with caution.
Just as matter-energy equivalence and wave-particle duality at one time seemed to defy common sense, so do type and function in one programming language. Once you see the similarities--fields/locals, methods/nested functions, and input parameters in constructor/definition---you will see not only the possibility but the reality. Please meet, for the first time, type/function equivalence implemented in the QED programming language.
Imagine a method to make C and C++ coexist. Using
uvw as a wrapper on the libuv library, you can use it for cross-platform asynchronous I/O. Our hero in this endeavor is a
void*, which bridges the two worlds, allowing exchange of objects with those who have none.
Interpreting timestamps is tricky because human input is not precise. We need programs that can make good guesses about what is meant by “next Friday” or “the 13th.” Fortunately, this Haskell-based fuzzy time library can use the current time to interpret input and find the closest, most likely timestamp match. Add in display of the current guess, and the user can see and correct the timestamp guess before it is confirmed.
Explore the power of four basic sequence functions: first, rest, cons and empty? in Clojure. Now you can write a wide variety of data manipulation functions with ease! Stay tuned for part II in the next issue, where we'll continue the adventure by looking at Map, Filter, and Reduce.