6 ms·
> But because the plumbing must be laid out so meticulously and in every situation, it is often hard to see how things work at a high level. You can't see an ar
by RyanZAG 13y ago
> But because the plumbing must be laid out so meticulously and in every situation, it is often hard to see how things work at a high level. You can't see an architectural sketch in Java, you can only see endless classes in endlessly nested subdirectories. This is a very low level of abstraction, and helps the layperson (such as someone approaching a new open source project) build up an understanding from the base elements. But what's lacking is the high level abstraction.
I agree that it becomes tricky to get an overview of the whole project in C/Java/etc, but I very much disagree that it actually becomes easy to get that high level overview in Scala/Ruby/etc. As soon as the project becomes 'interestingly large' and full of the corner cases that comes with interacting with reality, all languages fall down here. Regardless of the level of the language, you are still communicating with a machine. I'd guess that for a mathematician who has spent most of their lives looking at equations and little time talking to people, a mathematical functional language may seem easier to read than a novel - but for most people this isn't the case.
The best way I've seen to handle this regardless of language is to have the high level overview outside of the code in a human form document describing the reason for components and not just what they are.
This is also why I prefer simpler languages (like Java or C, as you say) - they are very good at specifying exactly what is going on with little room for creativity to confuse things. We use legal contracts for a reason - imagine if our laws were written in poetry? Writing a computer program is much closer to a law than a poem as you need to limit ambiguity as much as possible and specify as many corner cases as possible to prevent undefined behavior. Plus being at a lower level means optimization strategies are easier to see.
There's a reason C/Java/C#/etc are still the most popular languages, imo. The only real outlier being Javascript which gets its popularity from being the only option for the browser.
- nnq 13y ago> The only real outlier being Javascript which gets its popularity from being the only option for the browser. This is probably the reason for Javascript's popularity, but if you ignore some bad language design, Javascript is a very simple language with a very small number of concepts that you need to understand to start getting work done in it. Even Python (which I think is the simplest of the widely used dynamic languages) has a larger number of concepts that you need to understand than Javascript. So I don't think Javascript it's an outlier according to your theory, it's very much a simple language, the only remarking features compared to C/Java/C#/etc are the fact that it's dynamic and that some corners of it are badly designed, plus exceptionally badly designed API if you're doing anything in the browser that's not abstracted by a platform library.
- Sirenos 13y agoThat doesn't qualify as simple in my book though. Javascript has fewer concepts that programmers need to keep in their heads, but they are horribly inconsistent and quirky. Python, on the other hand, is consistently designed so that there are very few cases where you get hit with unexpected behavior.
- Skinney 13y agoWell, to be fair, most unexpected behaviour in js comes from people not knowing the language, or people expecting js to behave like other languages. I do agree though, that js does have its share of design quirks.
- chilldream 13y ago> most unexpected behaviour in js comes from people not knowing the language Isn't this just a rationalization? Any unexpected behavior is by definition something the user didn't know to expect.
- Skinney 13y agoWell yes. But in that case Haskell is full of unexpected behaviour for someone completely new to functional programming, as C++ is to someone used to Lisp.
- w0utert 13y ago>> This is probably the reason for Javascript's popularity, but if you ignore some bad language design, Javascript is a very simple language with a very small number of concepts that you need to understand to start getting work done in it I hear this a lot. JavaScript is great unless you [insert example why JavaScript isn't great]. You could easily turn that statement around: JavaScript sucks, unless you don't [insert example why JavaScript sucks]. It's an empty statement that could apply to almost any development language no matter how objectively 'good' or 'bad' it is. I don't know Scala, but judging from the (interesting) article it appears that Scala can be perceived as a bad language because it allows you to write obfuscated, hard to read code that hides many details of what's going on in the program. This can be both a good and a bad quality, depending on the kind of program, and the kind of developer. Personally I like languages that aren't too opinionated or restrictive, so I might like Scala. Compare this to JavaScript, which is a bad language for the simple fact that it's downright dangerous to program in looking at all the idiotic, arbitrary corner cases you have to avoid. You could have a philosophical discussion about the merits of the design choices in Scala, I don't think you could say the same about JavaScript though, it really is popular only by accident.