4 ms·
It might be a different point of view depending on which you enjoy more. For example I wrote a trivial raytracer in Haskell once for a project at uni. It was ha
by viraptor 15y ago
It might be a different point of view depending on which you enjoy more. For example I wrote a trivial raytracer in Haskell once for a project at uni. It was hard because I never wrote a raytracer before and I never used Haskell. I'm still impressed with the result and the process for a number of reasons I would happily discuss.
At the same time I used compile-time code generation in Java to rewrite some handcrafted class hierarchy into something that was short, correct and implemented the right interfaces consistently. It was also a non-trivial problem to solve and the result was very useful.
The difference is that I'll never describe the second one as something positive. It was time wasted working around inflexible constraints in Java in the only reasonably available way to make the code suck less. Sure, it required creativity and a clever solution, but I'd never want to do it again. Ask me about something interesting related to coding and I could mention the first example in a couple of contexts. The other one would be only mentioned with "Ah, you can't do that in a simple way, but I know a hack that will work - you'll just have to explain it twice to everyone looking at it."