3 ms·
What is needed is a programming language where you can get the same things done but by writing less code. There will obviously be diminishing returns in this.
by rogerbinns 15y ago
What is needed is a programming language where you can get the same things done but by writing less code. There will obviously be diminishing returns in this. On one project I as able to use 10 lines of Python as an alternative to 400 lines of C, but it seems unlikely that those 10 lines could be replaced by much less.
I do still find that I write far too much code to handle what isn't the normal flow, instead dealing with errors, unusual values, rare interactions etc. Exceptions cover some of that (except in Java with the annoying checked exceptions model). But there is still a lot of code that falls between exceptions and what gets executed most of the time. If only I could leave that rarely executed stuff out.
There is also a massive sore spot with functionality split across multiple processes/machines. Writing synchronous code is clear but has issues, while writing asynchronous code reflects what is really happening but involves a lot of baby sitting. I do think the functional world has immutable values right as a good approach (less locking to worry about, can be transferred between processes, easier to debug etc)
I look forward to the day when my programs look like this, all of one line long:
DWIM
(Stands for Do What I mean)
- msutherl 15y agoAbstraction comes at the cost of reduced specificity.
- rogerbinns 15y agoMake the normal things easy and the hard things possible. It has been a very long time since I cared how memory was allocated (eg pools, mmap versus heap). It has been even longer since I could determine how data was put on disk (choosing which sectors). Using Python I can say a list should be sorted and have no say over the algorithm. If I use the STL I have to make a few decisions. Java appears to have 7 different list implementations that I have to pick from. Working code that was quick to write is far more important than being very specific about every operation. In most cases it is sufficient. With profiling and real world usage you can get an idea of where more specificity is needed, but in many cases even that can be dealt with automatically (JIT, type inference, calling out to a different language). Even if you write new more specific code you can still use the existing code to test against.
- evincarofautumn 15y agoIt’s not just about “less code”. The thing that I’m concerned with as a language designer is separating the inherent complexity of programming from the incidental complexity of bad languages. Complex, verbose syntax is only a very small part of the latter. And it’s important to understand that parts of software development are inherently complex, and that “DWIM” is a limit to approach, not a goal to attain.