5 ms·
Yes, scala. I'm having some fun with it... but i'm also having a lot of arguments with it. I especially recognise the parts of "there is no best/single way of d
by BozeWolf 12y ago
Yes, scala. I'm having some fun with it... but i'm also having a lot of arguments with it. I especially recognise the parts of "there is no best/single way of doing things". I can overcome the syntax diabetes.
I'd like to do functional programming, I'm doing server/web based stuff mostly. I'd like the language to have a big(large) ecosystem. Clojure is fun and all, but it's more or less a hackernews language. There are only a few serious businesses using it. It also lacks a web framework like Play!. Same goes for Haskell. So besides all the bad stuff of scala, having play and quite a large ecosystem is why i wanted to try it.
- moomin 12y agoWhen the businesses are Twitter, The Guardian, The Daily Mail and Netflix, I wouldn't really worry about it. And seriously, the web story for Clojure is just fine. It's just componentized, it's not missing.
- bilalhusain 12y agoYour way of educating people about Clojure isn't particularly helpful. Don't make sure that people miss out a really good language, instead take this opportunity to share [personal experiences or impressive writeups about] how awesome web frameworks are on this side of the grass.
- nickik 12y agoI dont understand your complaint, he addressed the main complaint about clojure not really beeing used. > how awesome web frameworks are on this side of the grass This is kind of the point he was trying to make, clojure really does not have any major webframeworks. Clojure just does web devlopment diffrently. A hacker news comment is hardly the place for impressive writeups about web devlopment. There have been post like that in lots of blogs.
- bilalhusain 12y agoI read the comment as condescending and as a reply to the parent commenter's lack of knowledge about Clojure and Clojure ecosystem. May be I interpreted it incorrectly and that's why I suggested to shine the light on the real picture. Also, I didn't ask to write about web development, merely share information/links like the other comment (https://news.ycombinator.com/item?id=8420463 https://news.ycombinator.com/item?id=8420463) did.
- moomin 12y agoTbqh, my remark was pretty condescending, because the original comment seemed to be suffering from the DK effect. In fairness, there's a kernel of truth in that almost any article about Clojure seems to get uncritically upvoted, but that's another matter. The fact remains that Clojure, whilst not as popular as Scala, is nonetheless (quietly) in use at a lot of firms. Some more examples: * CitiGroup EU FX derivatives is pure-Clojure * There's at least three different hedge funds using it. * Deutsche Bank are definitely using it too.
- turar 12y ago>> Twitter, The Guardian, The Daily Mail and Netflix Are you talking about Scala or Clojure? I've only seen those names mentioned with their Scala use, what are some of their Clojure projects?
- moomin 12y agoDaily Mail actually serves their website using Clojure and uses it for various other tasks as well. (ElasticSearch backend.) Netflix: they definitely use it for Hadoop stuff, probably elsewhere too. And from this presentation they do a fair bit of Java interop with it: https://speakerdeck.com/daveray/clojure-at-netflix https://speakerdeck.com/daveray/clojure-at-netflix Twitter/BackType produced Apache Storm, which is written in Clojure. Not sure about the Guardian, I should ask, but they're definitely using it.
- simi_ 12y agoI don't want to be that guy, but why don't you try Go? It's the perfect server side language IMHO.
- deleted 12y ago[deleted]
- lmm 12y agoWith a type system that's weaker than Java's? Look at e.g. the way spray handles HTTP headers; it eliminates a bunch of errors that are in some sense trivial, but almost all bugs are trivial when looked at in the right way. You just couldn't do something like that in Go.
- grey-area 12y agoLook at e.g. the way spray handles HTTP headers... For those of us not familiar with Scala it'd be interesting to see you expand on that statement. Are you talking about the type definitions in this file? https://github.com/spray/spray/blob/release/1.1/spray-http/src/main/scala/spray/http/HttpHeader.scala https://github.com/spray/spray/blob/release/1.1/spray-http/s...
- lmm 12y agoYeah. It means you can e.g. respondWithHeader(`Content-Encoding`(UTF8)) { ... } and the header and its parameters are typed, and so if you make a typo in the name or the value (or try to pass the value of one header to another) then you'll get a compile-time error.
- grey-area 12y agoYou could type things like headers in Go too if you want to, by introducing a new type for each header in a similar way, get them to check values are valid on being assigned etc. (std lib does it in a simpler less robust way but it's quite possible). Go could then do compile time checking for those types, e.g. something like: http://play.golang.org/p/GeUgsjitVS http://play.golang.org/p/GeUgsjitVS func respondWithHeader(h HttpContentEncoding) string {...}
- megalomanu 12y agoYou should try Luminus, which concentrates all the basic libraries for web development. Not as rich as Play! or Django but sufficient for doing a lot of things. It's also a great way to learn Clojure smoothly, it's far more accessible than Pedestal for a beginner.
- BozeWolf 12y agoI actually might give Luminus a go if I give up on scala sometime. Thanks. I did have some fun with clojure, it's much easier to get started with. I know i'm kind of spoiled with features because I do a lot of projects which involve django. I do not expect a framework to be as rich as Django. But i prefer having some things integrated. Some might prefer choosing every component in a framework (ORM, url routing system, form validation etc), but when you work in a team or with freelancers, it comes in handy if theres just a way of doing things.
- nickik 12y agoPedestal client has been retired. Pedestal server is a high performance server framework that most people probebly want have to use. Pedestal gives you much more power offer use of threads and how you do controll flows between middlewares and such.
- somehnreader 12y agoWhats Syntax diabetes referring to by the way? I didn't get it from the presentation, and googling yields, well, diabetes information.
- moomin 12y agoIt's a phrase for too much syntactic sugar.
- rkrzr 12y agoIt's a play on the term "syntactic sugar": Too much syntactic sugar leads to syntactic diabetes. And syntactic sugar generally refers to language features that allow you to write things in neater ways. It is always possible to "de-sugar" such constructs by writing them in a more basic way, which is usually less neat. Examples would be e.g. list comprehensions, for .. in syntax, x += 1 etc.
- gamache 12y agoIt refers to the fact that there are many syntactically-equivalent ways to express the same code. Slide 11 shows expressions that evaluate to the same thing.
- somehnreader 12y agoThanks, that makes sense, I read the fooN functions but didn't make the connection with "syntactic sugar".