If anyone can develop a language that gives precise control at the level of the individual memory address in hardware, suitable for writing device drivers and operating systems, and yet is also possible for someone with only a weekend's experience in programming BASIC to instantly understand every possible nuance of the language, I'll be very impressed.
This is like complaining that the tools to repair a watch are really difficult to use well, and that we should do our watch repair with a hammer and chisel. Choose the appropriate tools for the job.
Not worth reading. The author makes a completely unwarranted leap from C++/Java to C, then proceeds to "prove" the lack of readability in C by giving a expression that screams for a preprocessor macro.
He also makes an unwarranted leap from C++, Java, and C to all compiled languages, though I’ll bet users of Haskell, Clojure, and the like would beg to differ.
Any time I've tried to tinker with a program written in C, I get mired in variables and functions with nondescript names referencing other variables and functions with nondescript names.
I don't know if it's a difference in conventions or language design, but I've found C# code to be even easier on my head than Java, which it borrows heavily from.
And there's no shame in that, and there's no reason why you should be instantly able to hack around with C code. It can be very low-level and very tricky to follow - that's the consequence of its power. The right tools for the right jobs.
As an aside, it's quite possible, of course, to write ridiculously tricky code in any language.
> variables and functions with nondescript names referencing other variables and functions with nondescript names
That's pretty much language independent. You can do that in any language, but should never try to. You can write clear and simple code in C, but that requires some attention and knowing how to encapsulate functionality in a pretty way using language which doesn't always help you.
if what he is looking for is a higher than C++/Java level language, there are plenty of higher level languages that fit the bill and are compiled. Haskell and OCaml come to mind.
The ability to write code in a complex manner is not the same as a complex language. I can write completely incomprehensible PHP code too, that doesn't mean PHP is a complex language. It means I'm a bad coder (in that language).
It's not compiled languages, it's languages that are too verbose and too complex that are the problem. If you want to use a compiled language that doesn't suck, try Common Lisp or Haskell. I don't understand how he made the jump from "Rob Pike doesn't like C++/Java" to "We should write everything in Ruby and Javascript!111".
11 comments
[ 3.0 ms ] story [ 18.0 ms ] threadThis is like complaining that the tools to repair a watch are really difficult to use well, and that we should do our watch repair with a hammer and chisel. Choose the appropriate tools for the job.
http://www.cdecl.org/
I don't know if it's a difference in conventions or language design, but I've found C# code to be even easier on my head than Java, which it borrows heavily from.
As an aside, it's quite possible, of course, to write ridiculously tricky code in any language.
That's pretty much language independent. You can do that in any language, but should never try to. You can write clear and simple code in C, but that requires some attention and knowing how to encapsulate functionality in a pretty way using language which doesn't always help you.