Accidental Technologist

Musings about Entrepreneurship, Technology and Software Development

  • Home
  • About
  • Still River Software
  • Privacy Policy

Powered by Genesis

One Night With Clojure Makes a Scala Guy Humble

August 23, 2012 by Rob Bazinet Leave a Comment

Tweet

Really interesting take on using Clojure?from a long-time Scala developer over on DZone

The lines of code (LOC) metric is the most interesting to me:

A simple metric generated with cloc, namely Lines of Code really blew me away about Clojure:

  • Java version: 755 lines of code (LOC)
  • Scala version: 419 LOC?s*
  • Clojure version: 57 LOC?s
Yup, that?s right, the Clojure version is more than 10 times less code, and about 7-8 times less than it?s Scala equivalent. In fairness though, the Scala number is a bit misleading: it was written before I got really familiar with Scala, and could probably be condensed to about 150-200 LOC?s. But still, it seems Clojure has a 3-4x advantage on even Scala.

As someone who has been dabbling with Clojure, mainly to learn some functional programming and see what all the hype is about, these details are really interesting and compelling. ?It may be time for me to convert part of an application to Clojure and experience for myself.

Share this:

  • LinkedIn
  • Twitter
  • Facebook
  • Email
  • More
  • Pinterest
  • Tumblr
  • Pocket
  • Reddit

Filed Under: Clojure Tagged With: clojure, functional programming, scala

Recent Posts

  • How to Fix Rails Flash Rendering When Using Hotwire
  • Hotwire Fix for CORS Error when using Omniauth
  • Fix Installation of Ruby using rbenv on macOS Big Sur
  • RailsConf 2021 and the Future of Conferences
  • Fixing Out of Diskspace Errors on Amazon EC2

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Exactly this…. https://t.co/yWj7fZ01HR
    about 1 day ago
  • https://t.co/EmagdpLoNv "Introducing GitHub Copilot X · GitHub"
    about 2 days ago
  • RIP Gordon Moore: https://t.co/c5J9LaHrj8
    about 2 days ago
  • Our daughter works as a teaching assistant at a local K-8 public school. It’s become apparent that students today r… https://t.co/p2t912GVyc
    about 2 days ago
  • Working to wrap up my current consulting gig by mid-April. I will be looking for the next thing soon. If anyone has… https://t.co/sg3cSV9yqM
    about 3 days ago
  • RSS - Posts
  • RSS - Comments
Find me on Mastodon