Follow Slashdot stories on Twitter


Forgot your password?

Comment: Re:Why are taxi drivers all so horrible? (Score 1) 295

by narcc (#48598537) Attached to: French Cabbies Say They'll Block Paris Roads On Monday Over Uber

You're trying to impose precision where none exists. I can certainly understand the impulse, but you'll save yourself a whole lot of trouble if you just accept the simple fact that language is naturally messy and imprecise.

If you can't, then at least just let this one go. It's really not worth the effort. What could you possibly hope to achieve?

Comment: Re:interesting points, link (Score 1) 161

by narcc (#48539469) Attached to: Why Apple, Google, and FB Have Their Own Programming Languages

Otherwise, where you have a choice, JavaScript is NORMALLY not the best suited for any role other than client side web page code. Exceptions may exist.

That's a bit more reasonable. Though I wonder why you limit its utility like that? Is there something intrinsic to the language that makes you think it's less suitable than, for example, Python in situations where that language is well-suited? For clarity: JS can't replace PHP where it works well for reasons independent of the languages themselves (that's in the differences between node.js and mod_php), yet JS obviously can't compete with C where C shines, for obvious reasons directly related to the languages.

Comment: Re:iow no, not one counter-example (Score 1) 161

by narcc (#48538805) Attached to: Why Apple, Google, and FB Have Their Own Programming Languages

It's the ONLY choice for client-side web. As I said twice before, that's the one place nothing is worse or better - because you have no other choice.

You seem to forget that, for many years, it was not the only choice. JS handily beat the competition. You may be too young to remember those early days, so I won't hold it against you.

Since neither iOS nor most Android devices run Java applets, that means MOST users today won't run them. A "solution" that won't run at all for most users isn't a solution. You can't say "Java and JavaScript would both work, but JavaScript would be better".

Again, you forget your history. Java in the browser was effectively dead long before iOS and Android hit the scene. It lost out for a reason, after all. Java had its chance, there was more than a little excitement surrounding it, and it still failed miserably.

If you're advocating JavaScript as a server-side language, well that's just silly.

I'm not advocating anything, just calling out your opinion as unsupported and uninformed. (You've never explained your reasoning. I assume that's because there is none and your just repeating a meme.) Still, you'll find that JS on the server is getting quite popular. Even sites like PayPal have adopted it. Call me crazy, but I'm pretty sure they're well-aware of the alternatives and selected JS anyway.

If a key component of the language behaves in unintuitive, surprising, and troublesome ways, that's a valid criticism.

In the case of this, it's only surprising if you know absolutely nothing about the language. If it behaved the same was that it does in a language like Java, it wouldn't make any sense at all. Once you understand the basics of the language, it behaves exactly as you would expect. As I said before, that criticism stems from pure, unadulterated, ignorance. For whatever reason, people seem to think that they don't need to learn the language before using it -- even though it's dramatically different from other languages.

Comment: Re:counter-example? (Score 1) 161

by narcc (#48536953) Attached to: Why Apple, Google, and FB Have Their Own Programming Languages

Where other options exist, the others are probably better suited to the task.

I can't imagine what you'd think is better. Other languages have adopted features like first-class functions and closures as a direct result of influence from JavaScript. What does that indicate to you?

Taking it further, the prototypal approach to OO that JS uses is, without question, superior to the classical approach. As there are vanishingly few examples of other languages that use prototypes instead of classes, just about any language you can offer as a substitute would be, necessarily, inferior. (A simple example for you, repeating a popular meme: Today, the 'best practice' is to favor composition over inheritance. JS naturally lends itself to composition; unlike Java, C#, and similar languages. Alternately: If you're a fan of the GoF book, for some reason, you'll immediately notice that many of the patterns described there are unnecessary in JS.)

To cement the point, the feature of the language most criticized (its type system) is uniquely well-suited to its intended purpose, making it exceptionally well-fit for the web. (Other popular criticisms stem from pure, unadulterated, ignorance: The behavior of this, for example.)

See, what you've done is adopt a popular (on slashdot anyway) opinion of a language that you don't understand. That makes you feel good when you're praised for making vague criticisms (like the one above) and validated when you read (equally uninformed) posts from others.

I'm curious what solutions could be worse than JavaScript.

Java and Python would be examples of popular languages that would clearly be worse than JS on the web, each for different reasons.

Comment: Re:Why program in Python (Score 1) 277

by narcc (#48520015) Attached to: Which Programming Language Pays the Best? Probably Python

Not with vague criteria like 'popular', which can mean whatever you feel best suits your interests. I can, however, point out numerous languages with far fewer problems with backward compatibility than Python. For fun, I'll use only languages that you're likely to despise: VBA, PHP, JavaScript, and Perl (even the infamous Perl 6 is slated to have a compatibility mode for Perl 5 code), just to name a few.

In each of those examples, you'll find that most, if not all, untouched 10-year-old code works in the latest releases. (Yes, even PHP, which has been known to give users a decade or more to deal with depreciated features.)

Comment: Re:Why program in Python (Score 3, Interesting) 277

by narcc (#48516735) Attached to: Which Programming Language Pays the Best? Probably Python

Hands down it can do everything perl can do - while providing clear, readable code that is consistent from one developer to the next.

My experience is different. Dramatically different, actually. I've seen very few examples of readable python, and very little consistency between developers.

I suppose you're referring to the controversial the white space rules? The killer-feature that can be replicated for any sensible language with a keystroke in virtually every editor? Or, if you prefer: The reason that anonymous functions in Python are crippled?

I'd even go as far as to say it's white space rules make Python code significantly more difficult to read, as you can't clearly see where blocks begin and end, particularly when the indentation level changes by more than one, which happens quite frequently.

I debugged my last hanging curly brace/missing semicolon long ago.

I'll bet it was easier than hunting down the invisible bugs from mixed tabs/spaces or introduced by your editor mangling indentation while moving bits of code around. You know, problems you're actually likely to encounter when using Python, unlike your examples.

Power corrupts. And atomic power corrupts atomically.