Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Clojure vs Scala

 
Greenhorn
Posts: 4
Scala Clojure Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amit,

As FP seems to be growing in popularity due to the Moore's law problem/multi-core machines becoming the norm, and the only other FP-JVM language around being Scala, I was wondering how you thought the two languages stack up against each other (i.e. are they orthogonal or stepping on each other's toes). I'm a little torn myself, having played with Clojure and it's uber-simple syntax, and then seeing Scala which seems (admittedly with next to no experience) very much the opposite with highly complex syntax/semantics. What do you think their use cases are, and can they co-exist successfully?

Thanks

Matt
 
author
Posts: 20
Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scala does espouse a functional style, but unfortunately core data-structures aren't all immutable. So you have to use libraries that offer immutable ones, and it then becomes a programmer-discipline issue of always using them. In Clojure, there are no other options, so this discipline is enforced for free.

Same thing with the STM system - clojure has one built-in, and thus all state-management functions use it. In Scala, you have to pick a library, and then hope that everyone uses it right, and so on.

These issues are deal-breakers for me - even before getting into Scala's overwhelming syntax. And obviously, Scala doesn't have a macro system.
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!