Ivan Reese
Ivan Reese
Kartik Agaram
Alex McLean
03/25/2024, 4:46 PMJoe Nash
03/25/2024, 6:34 PMJacob Zimmerman
03/25/2024, 7:15 PMDuncan Cragg
03/26/2024, 11:17 AMguitarvydas
03/26/2024, 12:24 PMIonuț G. Stan
03/26/2024, 3:29 PMeval
in JavaScript, which I never understood, since one should absolutely not use eval
on external input.wtaysom
03/26/2024, 3:38 PMJoe Nash
03/26/2024, 5:45 PMSquirrel
03/26/2024, 8:04 PMDuncan Cragg
03/26/2024, 8:11 PMSquirrel
03/26/2024, 8:31 PMDuncan Cragg
03/26/2024, 8:58 PMDave Liepmann
03/27/2024, 10:54 AMTypes are not blamed for the bugs they fail to find, the expensive bugs. And types do not get blamed for the problems they cause by requiring circumvention. Types can induce us to embrace cryptic, intricate, and dubious coding practices.An example he gives elsewhere of such circumvention:
The Java language encourages misuse of exceptions as a way to get around problems in its type system. A Java method can only return a single type of result, so exceptions are used as an alternate channel to return the ordinary results that the type system does not allow.The paper Well-Typed Programs Can Go Wrong: A Study of Typing-Related Bugs in JVM Compilers has some concrete bugs caused by types:
In statically-typed programming languages with rich and expressive type systems and modern features, such as type inference or a mix of object-oriented with functional programming features, the process of static typing in compiler front-ends is complicated by a high-density of bugs. Such bugs can lead to the acceptance of incorrect programs (breaking code portability or the type system’s soundness), the rejection of correct (e.g. well-typed) programs, and the reporting of misleading errors and warnings.
Ionuț G. Stan
03/27/2024, 11:15 AMThe word for 1 is misspelled. I use the corrected spelling wun. The pronunciation of one does not conform to any of the standard or special rules of English pronunciation. And having the word for 1 start with the letter that looks like 0 is a bug.That actually kinda puts in perspective all the other stuff, honestly.
wtaysom
03/27/2024, 6:11 PMSquirrel
03/28/2024, 6:59 AMThe Java language encourages misuse of exceptionsThat makes sense. I'm getting the feeling Douglas makes a sweeping generalization based on his knowledge of Java, which does not have a helpful type system. It shows ignorance to Typescript, which the question was actually about, and even more ignorance to more advanced type systems, such as that of Rust that prevents bugs by having a good way to handle errors instead of relying on exceptions, and also unlike Typescript prevent mixing up two different things that happen to have the same shape. I find it contradictory to claim that type systems are not helpful and in the same presentation preach the use of Eslint. Eslint can't do its job well, because it doesn't know the intended type of values, so it mostly does low value remarks that don't help prevent bugs. I consider objects to be one of the bad parts of JS, because Eslint can't detect invalid property accesses, so I don't do objects, and instead pass everything through closure variables that Eslint can check.
That actually kinda puts in perspective all the other stuffJes, é pörspektiv ov kaming ap with wan naív ajdía withaut síing the kontext énd thinking hí's rajt abaut it énd evrywan els is wrong. Ingliš has no konsistent speling, énd the wörd wan is nou eksepšön. Wí kud sí the big piktšör énd rífórm the houl lénggwitš, énd thät stil dásn't wörk, becós íngliš hes tú méni démn homofouns.
Dave Liepmann
03/28/2024, 8:38 AMI find it contradictory to claim that type systems are not helpful and in the same presentation preach the use of Eslint.Does JSLint (which he recommends at 5:35) incur the same costs of type systems (circumvention, cryptic or complex code patterns) which bother Crockford? To me it seems not, thus no contradiction. He uses the tool to block off parts of the language he considers foot-guns, and to "increase the visual distance between a good program and a bad one". These goals seem distant to those of type systems.
Squirrel
03/28/2024, 9:16 AMIonuț G. Stan
03/28/2024, 9:38 AMJustin Janes
03/29/2024, 2:18 AMJoshua Horowitz
03/29/2024, 2:36 AM