Live data from Hacker News

The End of Dynamic Languages

elbenshira.com

11–20 of 30 posts

Re: The End of Dynamic Languages

#11
A note on Typed Clojure: Ambrose is doing excellent work with it, and I'm excited to see it develop.

But I wished there was a bigger push from the top, from Rich himself, on "first-classing" typed Clojure. Aim for 100% annotation coverage for the most popular libraries. Start with core (maybe it already is? I haven't kept up) and ring, then move outwards from there.

Library writers will be more motivated to add annotations if the big libraries are doing it.

Re: The End of Dynamic Languages

#12
post #8

A completely contrary case can be made where static typing is doomed because hardware is getting more and more powerful, JIT and tracing is getting better and dynamic typing is convenient to the programmer while static typing is very convenient to the compiler and the processor. It's nonsense, both ways. Both static and dynamic type systems have their uses and, unless we substantially change the way we use computers…

I think the main point is that its very convenient to the IDE/developer, not for the performance. You know what things are before runtime. You can explore and have discoverable APIs much easier.

Most dynamic languages I've used in my career (javascript, python, php) have either metadata to typehint, a hinted superset of the language or new language support for typing.

Re: The End of Dynamic Languages

#13
> This is my bet: the age of dynamic languages is over.

I doubt it.

Yes, all the points the author makes are valid benefits of static typing. But the benefits of dynamic languages still exist. There are reasons people like both types of languages.

However, I think a more relevant point was made in the article: that statically-typed languages are looking more and more dynamic. And we can add to that that we see signs of dynamic languages adding more 'static' features, like optional types. Those are signs of convergence, of both major classes of languages learning from each other and improving.

But I still don't think we'll end up in the middle with "static, but feels totally dynamic". We'll still have both types of languages around.

Re: The End of Dynamic Languages

#14
post #4
post #2

I agree with the author. Even in a "statically typed" language like Go, which has a simple type system, compared to languages like Scala or Haskell, the benefits of static typing are very real and enables a lot of extremely useful tools (code completion, refactoring, linting, whole program analysis, etc.).

Code completion, refactoring aids, linting, and whole program analysis also exist in dynamic languages. Take a look at emacs with anaconda-mode for python or cider for clojure. IntelliJ in the forms of Cursive and PyCharm (or the Python IDEA plugin) also support all of these. Even vim can do this stuff (python-mode, fireplace.vim). I don't Ruby very often, but I suspect these tools exist here too.

def some_function(some_obj): ...

How does any IDE or editor know what some_function would be passed without a severe amount of inspection?

I might be wrong on my definitions, but almost by definition, there's just not enough information before runtime in dynamic systems to infer enough to do any real refactoring or smart completion.

I use PyCharm everyday, and I like it, but it's refactor menu is limited, can fail, and pales in comparison to my uses of java w/ IntelliJ or even a well hinted php app w/ PHPstorm.

Re: The End of Dynamic Languages

#15

A note on Typed Clojure: Ambrose is doing excellent work with it, and I'm excited to see it develop. But I wished there was a bigger push from the top, from Rich himself, on "first-classing" typed Clojure. Aim for 100% annotation coverage for the most popular libraries. Start with core (maybe it already is? I haven't kept up) and ring, then move outwards from there. Library writers will be more motivated to add annot…

I doubt Rich will ever push for it, but stranger things have happened. Types get in the way of data. When you ask a request "What's in you?" in Clojure you can just look at the data and find out. In Java you can ctrl+space in your IDE and look for public methods that by convention start with 'get', and then for the return values of those things also look for things that start with 'get', but that's a pretty impoverished way to get at the data. Try printing it out and you're likely to just get a memory address, great. So what do types buy you? Sometimes performance, but if that were always true then all static languages should be about as fast as C. The other thing is this "certainty" mentioned, and that certainty is just that you didn't make a typo or spelling error, woop-dee-doo, those are among the fewest sets of errors dynamic programming language users run in to, especially when you change your workflow to take advantage of the nature of dynamic languages, and a more valuable certainty is that this piece of data you have isn't going to change underneath you. You have to go all the way to Haskell (I'd argue Shen) to get real benefits of typing beyond performance and typo-protection, and most programmers are unwilling to do that for very good reasons.

Re: The End of Dynamic Languages

#16
post #13

> This is my bet: the age of dynamic languages is over. I doubt it. Yes, all the points the author makes are valid benefits of static typing. But the benefits of dynamic languages still exist. There are reasons people like both types of languages. However, I think a more relevant point was made in the article: that statically-typed languages are looking more and more dynamic. And we can add to that that we see signs…

Yes, I may have failed in getting it across, but a big point is this: I don't think dynamic languages will suddenly die out. Instead, strongly-typed languages will become more convincing. We are seeing better tools, and they are becoming more ergonomic.

Elm's latest blog post said it really well:

> Compilers should be assistants, not adversaries. A compiler should not just detect bugs, it should then help you understand why there is a bug.

http://elm-lang.org/blog/compilers-as-assistants

Re: The End of Dynamic Languages

#18
post #4

Earlier quoted context omitted.

Code completion, refactoring aids, linting, and whole program analysis also exist in dynamic languages. Take a look at emacs with anaconda-mode for python or cider for clojure. IntelliJ in the forms of Cursive and PyCharm (or the Python IDEA plugin) also support all of these. Even vim can do this stuff (python-mode, fireplace.vim). I don't Ruby very often, but I suspect these tools exist here too.

def some_function(some_obj): ... How does any IDE or editor know what some_function would be passed without a severe amount of inspection? I might be wrong on my definitions, but almost by definition, there's just not enough information before runtime in dynamic systems to infer enough to do any real refactoring or smart completion. I use PyCharm everyday, and I like it, but it's refactor menu is limited, can fail, a…

I agree. I haven't yet encountered an IDE that has any hope of doing anything more than being able to enumerate the defs in a module or the functions in an object. JavaScript is one of the worst because there is no canonical "include" semantic so you really have no idea what's going on. The corollary seems to be that many of these languages are fast to develop (and run) so excessive console.logs appears to be the "solution"

Re: The End of Dynamic Languages

#19
post #4
post #2

I agree with the author. Even in a "statically typed" language like Go, which has a simple type system, compared to languages like Scala or Haskell, the benefits of static typing are very real and enables a lot of extremely useful tools (code completion, refactoring, linting, whole program analysis, etc.).

Code completion, refactoring aids, linting, and whole program analysis also exist in dynamic languages. Take a look at emacs with anaconda-mode for python or cider for clojure. IntelliJ in the forms of Cursive and PyCharm (or the Python IDEA plugin) also support all of these. Even vim can do this stuff (python-mode, fireplace.vim). I don't Ruby very often, but I suspect these tools exist here too.

In the article, I mention that linters for dynamic langs are crippled. Of course I use them when writing Ruby. But can any of these tools tell me:

  - When two equivalent anonymous functions can be extracted out?
  - When a library method already exists for an expression?
  - When you fail to match every possible result in a case statement?

Re: The End of Dynamic Languages

#20
post #4
post #2

I agree with the author. Even in a "statically typed" language like Go, which has a simple type system, compared to languages like Scala or Haskell, the benefits of static typing are very real and enables a lot of extremely useful tools (code completion, refactoring, linting, whole program analysis, etc.).

Code completion, refactoring aids, linting, and whole program analysis also exist in dynamic languages. Take a look at emacs with anaconda-mode for python or cider for clojure. IntelliJ in the forms of Cursive and PyCharm (or the Python IDEA plugin) also support all of these. Even vim can do this stuff (python-mode, fireplace.vim). I don't Ruby very often, but I suspect these tools exist here too.

Not true...
Post reply on HN