News for hackers. Stuff that matters.
Re:A Year in Clojure by typon on Sunday October 07, 2018 @11:01AM (#18160876)
Almost every week a new article comes out from some language index saying Python is at the top or overtaking Java or C or C++ to reach the top very soon. I think the evidence is simply not there to support that static typing is somehow preferred by the average programmer.
Re:A Year in Clojure by hota_mazi on Sunday October 07, 2018 @12:26PM (#18161336)
There is plenty of evidence showing that the trend is toward static typing, not dynamic typing.

Starting with the fact that most dynamically typed languages today are progressively adding type checking (spec in Clojure, gradual typing in Groovy, etc...) while no statically typed languages are going the opposite way.

Re:A Year in Clojure by dragonwriter on Sunday October 07, 2018 @07:39PM (#18163218)
> Starting with the fact that most dynamically typed languages today are progressively adding type checking

At the same time, industrially-popular static languages have added dynamic escape hatches. The trend is really toward optional static type checking, with dynamic languages moving to opt-in typechecking and static languages moving to opt-out.

Re:A Year in Clojure by zmmmmm on Sunday October 07, 2018 @09:06PM (#18163498)
I agree, and interestingly I see it in my own Groovy code evolving over time. I look back at old code and it is full of needlessly dynamic types. Then I look at what I write now and I have just gravitated towards typing everything more and more. It's still great to be able to fall back to dynamic typing within local context where there is no loss of clarity from doing so. But putting a "hard shell" around the outside - function definitions, variable declarations, data types etc. makes me feel so much better about the maintainability and interpretability of the code. Sometimes I think I should just use Kotlin, but then I would miss the ability to drop seamlessly into dynamic mode when that makes sense. Especially in the REPL it is super nice.
Re:A Year in Clojure by vorg on Monday October 08, 2018 @05:18AM (#18165670)
> Sometimes I think I should just use Kotlin, but then I would miss the ability to drop seamlessly into dynamic mode

You can use Apache Groovy for just the glue code and Gradle build scripts, and use a statically-typed language like Java, Kotlin, or Scala for the actual system you're building -- that's what most programmers do.

Re:A Year in Clojure by vorg on Sunday October 07, 2018 @07:22PM (#18163167)
When statically typed language C# added a dynamic keyword, that's a language going the other way.

Of course, no-one actually thinks of C# as being a dynamically typed language despite its dynamic keyword, nor does anyone think of Apache Groovy as being a statically typed language despite its @CompileStatic annotation. In the everyday world, C# is used for building performant systems and Groovy is used for glue code and build scripts.

Languages tend to go both ways nowadays. Go first shipped with both static typing (though without generics except for builtin datatypes) and dynamic typing (though using the wordy interface{} marker).

Re:A Year in Clojure by sheepmullet on Sunday October 07, 2018 @07:36PM (#18163207)
> while no statically typed languages are going the opposite way.

Static languages added dynamic capabilities with reflection and run time code generation a long time ago.

Re:A Year in Clojure by bunderbunder on Sunday October 07, 2018 @11:33AM (#18161046)
I think there's a very good chance that this is being driven by the flap around data science, and the big push toward teaching programming in schools.

Assuming, for the sake of argument, that that's true, it means that we've got to think about how you define "programmer". Does it mean anyone who uses a programming language, or does it mean something more like "software developer"?

TIOBE, for example, effectively measures popularity among the former group, not the latter. Which means that, in the case of Python popularity, it's going to be picking up on all sorts of things: analysts and BI people ditching Excel in favor of Pandas, ops people ditching piles of shell scripts in favor of Ansible, graduate students choosing Scipy over R or Matlab, 7th graders with Pi-tops, ...