7 ms·
Ah, Parrot VM. Brings flashbacks of the dynamic typing bubble. No offense unitypers, maybe your typing systems have valid use-cases, I'm not sure. I'd like you
by paxcoder 10y ago
Ah, Parrot VM. Brings flashbacks of the dynamic typing bubble.
No offense unitypers, maybe your typing systems have valid use-cases, I'm not sure. I'd like you to convince me if possible.
EDIT: Using slightly less off-putting language. I truly welcome arguments, even sound opinions.
- klibertp 10y ago“...William wondered why he always disliked people who said 'no offense meant.' Maybe it was because they found it easier to say 'no offense meant' than actually to refrain from giving offense.” ― Terry Pratchett, The Truth
- 0xcde4c3db 10y agoI sometimes wonder what it means that there's a common, concise idiom for "I'm about to knowingly say something offensive, but if you're offended it's your fault".
- gaius 10y agoThese days, someone will be offended by pretty much anything. So just say what you want to say. No amount of pre-apologising well help you because getting offended was their real goal anyway.
- paxcoder 10y agoI mean no offense to people who like dynamic typing. However, dynamic typing itself may just deserve to be dissed. But I'm not sure. So tell me if I'm wrong. I probably shouldn't have used the word bubble, sorry. See my response to klibertp for hopefully some justification.
- deleted 10y ago[deleted]
- 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.
- kazinator 10y agoDynamic typing isn't "unityping". It is typing, period. For an example of a respected academic discussing dynamic typing properly, recognizing it to be typing, see Henry Baker's paper The Nimble Type Inferencer for Common Lisp. https://news.ycombinator.com/item?id=13616965 https://news.ycombinator.com/item?id=13616965 In dynamically typed code, it is often possible to logically infer the type without executing it, so that the same information which is known at run-time can be ascribed to nodes of the syntax. These are not two different type systems; it's the same information, just known at different times to some degree of completeness. Quote from the paper: We have chosen to perform static type inference on programs in the dynamically-typed Common Lisp programming language [CLtL84]. Common Lisp-84 has a reasonably complex type system. This system involves 42 simple type specifiers, 4 standard type operators, and 21 type specialization forms. Common Lisp has the usual primitive integer and floating point types, characters, the traditional atoms and conses of Lisp, vectors, arrays, and strings. In addition, Common Lisp has a host of non-traditional datatypes, such as hash tables, readtables, and other special purpose types. The datatype system can also be extended through user-defined structures, which are analogous to structures in C and to records in Pascal and Ada. No nonsense here about Common Lisp having just one type, the value cell.
- evincarofautumn 10y agoSure, dynamic types are types. And nothing stops you from running a full-featured typechecker at runtime, one that can enforce useful invariants beyond “expected int but got string”. It’s just markedly more useful to me to have that information available statically. I like being able to modify code with the assurance that the compiler will tell me about all inconsistencies. I like that the compiler can prove that its automated transformations are correct. Of course, maybe that says more about the way I work than type systems themselves.