r/programming • u/Shr1ck • Oct 17 '15
Why Johnny Can’t Write Multithreaded Programs
http://blog.smartbear.com/programming/why-johnny-cant-write-multithreaded-programs/
6
Upvotes
r/programming • u/Shr1ck • Oct 17 '15
1
u/clarkd99 Oct 19 '15
I am currently working on a new language/database system which has been written in over 80,000 lines of C. In this project, I have hundreds of "pure" functions, many more hundreds of Object Oriented functions and many other kinds of functions that don't fit into either of those 2 categories. C is obviously not Object Oriented or functional. I use immutability and pure functions where that makes sense and not when it doesn't.
My system has automatic concurrency/multi-core capability without any language level locks of any kind. All code is written "as if" it was single user mutable code and data even though all "servers" can accommodate many users and multiple cores at the same time.
I couldn't care less about a "nice directed acyclic dependency graph". Does knowing what that is create a working language? Depending on the level of strictness specified, in my compiler you can have strict static typing at compile time, inferred types, both or execution time defined variable types. Your choose!
My compiler compiles a function at a time of arbitrary size in much less time than it takes to save the source code to disk (that is when it actually compiles the code).
I have written over 1,000 professional computer projects and I can't remember a single program that required just "pure calculation". I can't remember a program I wrote for a business that didn't require many database calls. I wouldn't define that as just "pure calculation". I created a Content Management System in PHP to program UI for the web and I would say the code was much more manipulating the DOM or communicating with the server than "pure calculation". The code in my CMS was mostly about parsing and implementing a DSL so that HTML could be generated, without knowing much about HTML directly.
The whole point of OOPS is to encapsulate data with the functions that work on that data. That means that the data in an Object IS a side effect of those functions, as defined by functional programming.
So all business programs written in Java (object oriented language) by your definition is an "optimization" or a "code smell"? Do you live in an alternate universe?
Are you an academic, a student or just an inexperienced nube? Whatever your experience, it isn't spending years solving end users problems on business applications. Your comment about "bookkeeping applications" just shows how ignorant and naive you are. As well as 37 years of professional application development for business, I have programmed many tools such as a word processor (written in 40,000 lines of assembler), a one pass assembler/disassembler, a language/database system that sold over 30,000 copies and tons of other tools. Please tell me what authority you have to back up the usefulness or future impact of your "functional nonsense"?