5 ms·
> The basic concepts are simple, but the implementation details quickly become very complex True, but those kinds of questions come up in every language: Shoul
by taffer 6y ago
> The basic concepts are simple, but the implementation details quickly become very complex
True, but those kinds of questions come up in every language: Should I use an array or a dictionary? Should people have references to projects or should projects have references to people or both? Is money a float, an int, a decimal or should I write my own money class? Should I memoize the results? Is it thread-safe?
As you can see, this could go on forever, pretty much for any language.
- UncleMeat 6y agoThey do. And language designers seek to smooth the edges and develop ways to encourage devs to write clear and intuitive code. When a language says "well, these are hairy questions that you should just figure out" we tend to criticize those languages unless they have clear reasons for that decision. It should be obvious that something is thread-compatible. "Well, if you model it in pi-calculus it is easy" is a crappy way of handling criticism. "Its easy if you think about it mathematically" is not enough.
- taffer 6y agoIn which language is it obvious not to put money into a float? In which language is it obvious if I want a synchronizedSortedMap or an arrayList? There are simply things you have to learn to use a technology. If you want to write Java, you need to know what a variable is, what a for loop is and what Inheritance/Interfaces are. Likewise, in the case of SQL, it means you need to know concepts like normalization, ACID and joins. Just poking around until the code works won't do it.
- UncleMeat 6y agoNo language is perfect. But surely you'd agree that there is a spectrum here. In C++ you have to think "should this be a pointer or a reference" all the time. In most modern languages, you never do. And although there are clear methods to write C++ well, it is rightly criticized for being overly complex and unintuitive. For example, std::set is ordered. That's a basic mismatch with expectations. Sure, you can just check the docs. But how much code would be more efficient if they had just spent a bit of time making things easier to work with?