On Tue, Jun 17, 2014 at 11:16:22AM +0000, via Digitalmars-d wrote: > On Tuesday, 17 June 2014 at 09:17:21 UTC, Nick Sabalausky wrote: > >I think you're hitting on the fundamental limitations of automated > >code-updating tools here: They can't be treated as trusted > >black-boxes. > > I don't think this is a fundamental limitation of tools, but a > consequence of language design. > > I also think that features that makes it difficult to write programs > that analyze the semantics also makes it difficult for humans to > understand the code and verify the correctness of the code. > > Programming languages are in general still quite primitive (not > specific to D), they still rely on convention rather than formalisms. > > Semaphores and macro-like features are pretty good examples where > convention has been more convenient than supporting machine reasoning, > but it has consequences when we demand better tooling, smarter > compilers and faster code! > > Semaphores cannot be turned into transactional memory code paths… > Macro like features prevent high level transforms and optimizations, > source code restructuring/refactoring etc.
I think you are underestimating the complexity of programming. Automated tools can only go so far -- ultimately, human intervention is needed for certain code transformations, and perhaps even that can only go so far, because programming is inherently complex! Turing-complete languages exhibit unsolvable problems like the halting problem (that even humans can't solve), besides also exhibiting intermediate intractible complexities like non-primitive-recursive functionality and the expression of NP-complete problems that are inherently irreducible to simpler constructs. Granted, 90% of application code these days are nothing but trivial variations on trivial computational tasks, like sorting, shuffling data around, etc.. So this part is easily automatable. But I think you're deceiving yourself if you think that automation is possible beyond the trivialities of programming. T -- If it tastes good, it's probably bad for you.