Here we write about Nikki and the Robots development and other news. Be sure to subscribe! Visit our reddit forum and join IRC for even more info!
Redundant Source Code
WARNING: This is a development post. So if you're not into programming, you might find it pretty boring...
Some days ago, I wrote a data type and an equality-like function similar to this:
Some days ago, I wrote a data type and an equality-like function similar to this:
data Edge a = Edge {from :: a, to :: a}
(=~=) :: Eq a => Edge a -> Edge a -> Bool
a =~= b = from a == to b && to a == from b
Then I wrote a short comment about what the function does:
-- a =~= b = from a == to b && to a == from b
Then I realized, I had just exactly reproduced the functions implementation in the comment. Hurrah for Haskell! (once again)Tags: game tech, nikki, open source
















