29 ms·
> A code should never fail at runtime because you made a function name typo that it couldnt tell you about any other time for free. So you also reject all dyna
by cratermoon 6y ago
> A code should never fail at runtime because you made a function name typo that it couldnt tell you about any other time for free.
So you also reject all dynamic and weakly typed languages? No JavaScript, Objective-C, PHP, Python, Ruby, Lisp, or Tcl? No type coercion at runtime?
> at the cost of having non compiled production code
Groovy can be compiled to the same bytecode as Java.
- gher-shyu3i 6y agoFor any non-trival program (more than a couple of files/pages long), dynamic and weak typing are a no-go.
- cratermoon 6y agoHow strongly typed is C? Are non-trivial programs in C a no-go? Would a LISP program more than a couple of pages long be forbidden?
- gher-shyu3i 6y agoThere are toolings that patch C's shortcomings, and there's a reason better typed languages (e.g. Rust) are making strides in C's domain.
- jjgreen 6y agoTIOBE gives C 14.32% (1) against Rust 0.49% (29), so "strides" might be over-egging the pudding.
- gher-shyu3i 6y agoHistoric vs future trends.
- thrwaeasddsaf 6y agoWhich tools patch C's shortcomings?
- gher-shyu3i 6y agoStatic analysis tools and subsets like MISRA C.
- thrwaeasddsaf 6y agoDo you have a good one in mind? All the open source tools I've tried are MISRAble
- gher-shyu3i 6y agoNope, I haven't been working with C recently.
- kazinator 6y agoIf the language doesn't help you with a function name typo, that's crap dynamic. Not only is that not a feature or benefit of dynamic, but it fuels unfair strawman arguments against dynamic. Here is something I made largely for my own use: This is the TXR Lisp interactive listener of TXR 257. Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet. TXR is enteric coated to release over 24 hours of lasting relief. 1> (file-put-string "test.tl" "(foo (cons a))") t 2> (compile-file "test.tl") * test.tl:1: warning: cons: too few arguments: needs 2, given 1 * test.tl:1: warning: unbound variable a * test.tl:1: warning: unbound function foo * expr-2:1: variable a is not defined That's still a strawman; it only scratches the surface of what can be diagnosed.