6 ms·
> Because languages like Scala and Clojure are rapidly taking over from Java in the enterprise space Let's see how much of the momentum these languages keep af
by _pmf_ 12y ago
> Because languages like Scala and Clojure are rapidly taking over from Java in the enterprise space
Let's see how much of the momentum these languages keep after Java 8. Default methods, the new stream API and lamdas provide much what most developers need without introducing baroque features and orthogonal infrastructure.
- agumonkey 12y agoDoesn't change the point. It's called JAVA but with lazy streams and closures, everything Java culture built prior that will be moot and that's what the article is pointing at. Same thing happened in PHP land, people say PHP is great now, but what is PHP ? PHP5, which is a perlish javaesque thing ? or the regex craze html implicit template system that was PHP4 ? ... OOP is too verbose by it's essence compared to closures. I tend to see curried functions as anonymous objects (old lisp koans joke on their duality).
- pjmlp 12y ago> OOP is too verbose by it's essence compared to closures. Then CLOS is too verbose?
- agumonkey 12y agoCLOS is a layer on top of CL, it's optional. Also, LISPs are as verbose as you want them too. If you identify boilerplate you macro it away. It's part of the culture. Some systems (php/symfony2, eclipse/emf) go out of their way to generate unnecessary temporary files, templates and such but it's still cumbersome. To be honest, CL shows its age (mapc, mapl, do, dotimes, loop ...), more functional approaches like sml are very tempting, for the small size of their core in which you define all other patterns. I'd love to see a blend of lisp and ml (racket maybe?).
- pjmlp 12y agoTalk about workarounds.
- agumonkey 12y agoLisp macros ? (first-class and generic, not bad for a workaround)
- pjmlp 12y agoNo, faced with the fact that CLOS is also verbose, although in a language that is all about closures, you started to present workarounds how to simplify its verbosity.
- agumonkey 12y agoI don't find CLOS verbose. Private slots by default, accessors as option ... I find LISPs quite succint in general, sure lots of parens, but usually the bare minimum of information is required. This contrasts with the large amount of useless code you can see in Java class definition that amount to nothing (setting fields, toString, manual get/set).
- sjolsen 12y agoCLOS is verbose if all you're doing is encapsulating some state. If, on the other hand, you plan on doing anything remotely interesting, it's very succinct and expressive. Trying to emulate the functionality of CLOS' multiple dispatch and mixins in Java or C++ is hell beyond hell. As for verbosity, I'll take ":accessor foo" over methods "getFoo" and "setFoo" with inane, useless autogenerated comments any day of the week.
- sjolsen 12y agoI find it very strange that you've thrown LOOP in there. It may not be as sexy as canned functional algorithms or simple recursion, but for complex algorithms, it's an absolute joy to use. I couldn't count the number of times I've been writing C or C++ and wished I could express an idea more complex than "Initialize some variables (which may or may not be of the same type (but not of arbitrary different types)); run while this is true; do this thing after every iteration" without just slapping everything into and in the immediate vicinity of a while-true block. I don't have that problem with LOOP.
- sigmaml 12y ago> OOP is too verbose by it's essence compared to closures. Could you comment on Smalltalk's blocks?
- agumonkey 12y agoI never used ST, I thought a block == closures, but according to http://c2.com/cgi/wiki?SmalltalkBlocksAndClosures http://c2.com/cgi/wiki?SmalltalkBlocksAndClosures there were differences until they wanted to make blocks real closures. edit : I should have said closures + curryfication so you can partially augment the creation of a final callable entity that binds many parameters (similar to an object constructor arguments)
- eitland 12y ago> Same thing happened in PHP land, people say PHP is great now, but what is PHP ? PHP5, which is a perlish javaesque thing ? or the regex craze html implicit template system that was PHP4 ? ... Get the facts straight please. As much as I don't like everything about PHP, PHP means PHP5 and it has been like that for a few years.
- agumonkey 12y agoI'm talking about languages evolution. PHP5 got a Javaesque Object System, closures, generators. The idioms that will emerge will be close to other language with similar features, and what made php php is becoming less and less so.
- _pmf_ 12y agoPHP is actually the perfect example to disprove my point (pig with new lipstick). I'll reflect on that.
- agumonkey 12y agoPHP is a funny thing, started very very low (https://twitter.com/agumonkey/status/488432654577303554 https://twitter.com/agumonkey/status/488432654577303554), and nowadays it's got a lot of very positive improvements (linguistic features, faster interpreter, principled community). Who knows how long it will survive ...
- threeseed 12y agoIf you think those features change anything then you must have a poor understanding of FP or why people are moving to Scala/Clojure. It is a fundamentally different way of developing code that is starting to look really appealing to the enterprise. The iterative development with a REPL approach deployed with micro services lends itself well to Agile development where big bang architecture simply doesn't work.
- dmacvicar 12y agoI did the two FP courses from Mr. Odersky using Scala as the main language and then continued playing with the language for small experiments. While the language is awesome in general, I would not recommend it at work.
- wtetzner 12y agoAny particular reason you wouldn't recommend it at work?
- deleted 12y ago[deleted]
- dmacvicar 12y agoAs the author of this post mentioned the culture of the Java developers, the "architect" thing and the frameworks, Scala has its own similar problems: it attracts a group of academics on type systems and creates over-engineering in a completely different direction. Also, while I think Scala is simple at its core concepts and syntax, it gets complex because it has too many features and tries to support all features present in other programming languages. Why do you want structural typing there?. Also, I hated sbt.
- frowaway001 12y ago> it gets complex because it has too many features and tries to support all features present in other programming languages Which things do you have in mind? > Why do you want structural typing there? Isn't that a simplification? Instead of saying "here are types which you can use as e. g. parameter types, and here are types which you can't use (like in Java)", it says "all types work the same way".
- dmacvicar 12y agoI understand what it is. I don't see the need of it if you already have a class-based system. Go uses structural typing. But it is the only thing they have. Rust has traits, and it is the only thing they have. I can't think now of more stuff but I remember you could even write xml in the language.