5 ms·
> dynamic typing bubble Could you explain this? I'm not aware of such a thing at all? > maybe your typing systems have valid use-cases, I'd like to ask befor
by klibertp 10y ago
> dynamic typing bubble
Could you explain this? I'm not aware of such a thing at all?
> maybe your typing systems have valid use-cases,
I'd like to ask before I start explaining, what is your current level of knowledge on different kinds of dynamically typed languages? It's hard to say from your comment alone[1]. Have you ever worked with a Smalltalk or Lisp live environments? Have you ever used Assembly or Forth? Are you aware of Erlang's Dialyzer or Racket support for contracts?
There are many ways to do dynamic typing, and they vary widely in both their aims and methods. It's important to note, however, that most dynamic type systems arise from a severe failure of static typing. As long as there are useful programs which would be rejected by a type checker dynamic typing will remain in use.
[1] I'm trying really hard to apply 'principle of charity' here.
- paxcoder 10y agoThe popularity of dynamic typing, I think, was at its peak around 2010, mostly due to the purported rediscovery of the "good parts" of the only client-side language for the web, the unprecedented acceptance of Python by academia, and the popularity of Ruby on r..the web (but PHP as well). Around the time that asm.js started being discussed, however, the trend was reversed: Though it may have made the benefits of static typing obvious, need for speed wasn't what replaced the likes of CoffeeScript with the likes of TypeScript. As web applications became more complex, the old Large Systems called for safety guarantees. Industrial languages never even considered losing their types, while improving considerably by adopting functional concepts. Nowadays I see no notable arguments for dynamically typed programming languages. With the exception Fowler's 2005 testing argument being reiterated, static typing is no longer being challenged. The new kids: Go, Rust, Swift - they all indicate that the errors will not be left to the runtime (or the unit test). It seems to me that the advocacy has been reduced to voicing personal preferences. I may still provoke the bold claim of there being "severe failure of static typing", but without any arguments, the default today is going to be to discount the claim, on account of the probability that it has merits that outweigh type safety alone. I have only used a JS live environment (the browser console) but I hope you have in mind something that my static language's debugger cannot do. I assume the next two languages are about reflection - I've done some. Finally, I'm unfamiliar with the Erlang's static analysis tool and I don't know Racket's contracts, but I'd like you to tell me how they differ and why you think they're better than my own.
- jhbadger 10y agoI wonder if this is a generational thing. Learning programming in the 1980s with Pascal, static typing was just seen as a fact of life. When I discovered dynamic typing/scripting languages in the 1990s it was a revelation -- it made programming much more productive and perhaps equally as important, fun. The current generation grew up on scripting languages and now this current return of static typing is seen as something new and exciting rather than a return to the old days. Computing has recurrent ideas/fads. In the 1970s/1980s, a popular strain of Pascal was UCSD Pascal, which ran on a virtual machine (the p-machine). People realized that this was inefficient and moved to native binaries. Kind of what's happening now with JVM and .NET as the new wave of programming languages make native binaries again.
- klibertp 10y ago> It seems to me that the advocacy has been reduced to voicing personal preferences. It was like this from the beginning. Almost all arguments about type systems center around how "useful" the type system is. This is obviously a problem: the usefulness is a subjective notion! Two people with different preferences (and/or in different circumstances) may disagree about how useful some particular type system is - and they could be both right, at least for their use cases. This makes the discussion hard and tiring. For dynamic typing people, static type systems are limitations which need to be subverted before they can code using their preferred techniques. For static typing people, types are tools which allow them to code the way they like. It's entirely subjective matter. In effect, it is almost impossible to "convince" people without first broadening their technique sets. There is literally no good argument for the other typing kind if you continue writing code dependent on the previous typing scheme. And when you master techniques from both sides you tend to realize the subjectivity and become disinterested in the topic, which doesn't help the quality of the discussion... > Nowadays I see no notable arguments for dynamically typed programming languages. A quick Google brought up an article from Dec 2016: https://medium.com/javascript-scene/you-might-not-need-typescript-or-static-types-aa7cb670a77b#.1o9vouhah https://medium.com/javascript-scene/you-might-not-need-types... > The new kids: Go, Rust, Swift What about Elixir and Clojure? Not to mention, the dominant platforms (JVM, CLR) getting better support for dynamic languages? > I may still provoke the bold claim of there being "severe failure of static typing." I think you interpreted my statement too broadly. What I said was that dynamic typing systems are being created in response to a particular (class of) programs which are correct, yet rejected by the static type checker. Such rejection is viewed as a "failure" of static typing, that's all. > I hope you have in mind something that my static language's debugger cannot do. No. There's nothing you can do in one language and definitely cannot in another, as long as the languages are both Turing-complete. You can write an interpreter for a dynamically typed language in a statically typed one and a statically typed language preprocessor (type checker) in a dynamically typed one. I mentioned Racket contracts because of the research and work that went into a statically typed dialect of Racket, the TypedRacket language. One of the goals of the project was seamless interop with dynamically typed Racket while providing the safety guarantees in both worlds. This resulted in the automatic generation of contracts out of types. This is an impressive example of an argument for dynamic and static type systems equivalence. I mentioned Dialyzer because of the notion of "success typing". Dialyzer is a static type checker, which only rejects programs it knows for sure will result in error. Traditional type systems require the programmer to supply the proof that the code is correct and will refuse to type check without one. Dialyzer is optional, meaning you can provide the types or not and it will accommodate. It gives many of the advantages of static typing without being a pain. I mentioned Forth and Assembly because these are the only languages I know of (TCL may also qualify) which are truly unityped. I suppose you'd like dynamic typing more after working with something which lacks any kind of types. I mentioned live environments of Smalltalk and Lisp because they provide the tools which rival (and, frankly, beat) the tooling enabled by static type systems. These environments are designed to be always running, you load your code and changes into the running image. Combined with reflection and introspection, it allows for the most accurate auto-complete you've ever seen: at any point, you know exactly which classes have which methods. The refactoring tools of Smalltalk are legendary and are possible only because the code itself is a part the running image and may be queried and changed programmatically (at run-time). Gilad Braha has some good talks on the advantages of a live environment over a static one. Well, in any case, you shouldn't wait to "get convinced" by someone. You should try to learn the dynamic typing side of things on your own and use it for a while. It will make you a better programmer overall, even if you get back to static typing later.
- McCirculaire 10y ago>> dynamic typing bubble >Could you explain this? I'm not aware of such a thing at all? Around 2005 - 2010 there was a massive amount of proselytism on the internet in favour of dynamic languages. The likes of Steve Yegge, DHH, Zed Shaw, Mark Pilgrim, Why the Lucky Stiff, Paul Graham (with lisp) and others were constantly pushing new blog posts, articles, books about the merits of dynamic languages and new teaching material and if you were to read HN or reddit from those years you'd think it was the end of statically typed languages. You couldn't spend a day without seeing things like Ruby on Rails pop up on slashdot and other media. Fast forward to today : All the new languages that have gained internet fame in the past years are static. Go, Rust, Typescript, Dart. People still use lots of Java and C#. Meanwhile big companies like Dropbox are abandoning languages like Python. New projects are written in Go despite being the company that employs Guido van Rossum. Nobody talks about Google caring about python anymore either. The dynamic typing "rockstar programmers" have all but disappeared from the internet and stopped blogging/writing articles/writing books, with only one exception, Zed Shaw. The rest have either completely erased their internet presence or just become utterly silent. There really is a moment on the internet that could be described as the dynamic bubble. Although I'd say, "dynamic echochamber" is more accurate.
- xapata 10y agoOr perhaps they don't have to yell about it anymore, because so many people have been convinced.