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

  • Social Media Times Are Changing
  • It has certainly been a long time…
  • 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

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Great little utility https://t.co/6AgboJv6oI
    about 1 day ago
  • Funny watching the hate to show up in my time line for ChatGPT. People getting defensive about it.
    about 4 days ago
  • I just backed The SaaS Playbook, by Rob Walling on @Kickstarter https://t.co/1FpTWN9c9v
    about 5 days ago
  • This looks like an interesting project. I need to dig in a bit. https://t.co/gacEX9AmEn "Phlex — fast, object-orie… https://t.co/4AUL0Z0SBl
    about 5 days ago
  • I attempted to use ChatGPT today and asked a couple questions it couldn’t answer. I thought it was a magical black… https://t.co/uJGw0CgUAv
    about 5 days ago
  • RSS - Posts
  • RSS - Comments
Find me on Mastodon