4 ms·
"Python behind the webserver is a powerful tool and one that has enabled a lot of great sites and products and services. Unfortunately, once the content hits th
by jayflux 14y ago
"Python behind the webserver is a powerful tool and one that has enabled a lot of great sites and products and services. Unfortunately, once the content hits the wire, the Python stops."
Not sure if im being ignorant here but surely this is a problem for most server side languages? PHP, Ruby, Go, Perl would all suffer the same problems. Browser vendors only want to have JS client side for obvious reasons, this doesn't just affect python.
Js is clearly doing a fine job at client side programming, should we not be happy with that?
Why are people obsessed about creating a "jack of all trades" language instead of letting languages do what they do best?
Taken from the comments...
"I suspect javascript will become like assembly and all languages targeting the browser platform will need to be compiled to javascript."
That sounds like hell to a front-end developer. Its bad enough learning coffeescript or other dialects if a company uses them, but other languages too?
- anonymouz 14y agoI agree. Python is very popular for web development (server-side) as well as for GUI/CLI application development. It has attained "critical mass" a long time ago, and won't go anywhere anytime soon. Python has a number of strengths and weaknesses that make it suitable for many applications and not so suitable for many others. But that's ok, it doesn't need to be the one-and-only language to succeed.
- icebraining 14y agoThat sounds like hell to a front-end developer. Its bad enough learning coffeescript or other dialects if a company uses them, but other languages too? Isn't that like saying that having many server side languages is hell to server-side developers? And isn't it making JavaScript effectively a jack of all trades? You might want to run code on the browser that is better expressed in a different language. After all, the days of client-side code being just a few value checks and DOM manipulation are beginning to disappear.
- valdiorn 14y agoJs is clearly doing A job at client side programming, because there is nothing else available. I would so, so happily drop Javascript for just about ANYTHING else that works on IE+Chrome+Firefox+Safari. IMO, Javascript is just awful, and I know I'm not alone with that opinion.
- smoyer 14y ago"Js is clearly doing A job at client side programming, because there is nothing else available." So Java Applets are forgotten already ... and they had such grand plans! I for one won't miss them at all.
- romaniv 14y agoJava was never in a similar position to JavaScript. Java applets were never properly implemented as an integrated browser component that you can rely on. For example, you couldn't use Java to manipulate DOM and CSS.
- rom16384 14y ago>IMO, Javascript is just awful, and I know I'm not alone with that opinion. I had that opinion at first, but actually Javascript is a pretty good (and even pretty) language if you stick to the good parts [1]. Having the code automatically checked by JSHint helps a lot. [1] "JavaScript: The Good Parts" by Douglas Crockford
- singold 14y agoI needed to link to this image: http://anongallery.org/img/2/0/javascript-the-good-parts-the-definitive-guide.jpg http://anongallery.org/img/2/0/javascript-the-good-parts-the...
- Smerity 14y agoThat's the issue with this -- if this is actually a problem for Python, then it's a problem for EVERY programming language. Let's first see what satisfies these problem areas: Mobile = [ObjectiveC, Java, C (native client)] (and maybe Javascript+HTML if you look at the "compile down"/"webview" solutions) Browsers = [Javascript] (and _maybe_ C if you say Emscripten is actually a sane solution to problems but I'd argue it fits only a minority of cases) Games = [ObjectiveC (iPhone games), Java, Lua (scripting/plugins), Flash/ActionScript, C, C++] No single language fits across all of these (dare I call them) niches. Every single language other than Javascript fails the "Browser" test. I'd argue that focusing on many of these niches is the wrong way to go. Trying to fight for a spot on the mobile front will be a losing battle as Python will always be a second class citizen or flat out denied. The game development front seems like a confusing goal -- how many devs picked up Lua from the plugin system? Additionally, Python isn't fast enough to be the base nor faster than Lua for the plugin system. The metric that he says he's optimising for is "adoption". I just feel like he's working backwards and optimising for tiny use cases instead of the general case. Many Java classes at university are being replaced with Python for example, and I'd say that's more important for adoption than any of these areas (other than web).
- zanny 14y agoDon't forget C# from Unity under games. The take away here is that since client side web programming can only be javascript, it pigeonholes a large chunk of development effort into a forced language. I can't wait for the day web browsers can leverage multiple DOM aware scripting languages. The fact the JS JIT is already tightly coupled with an html / css parser is already bad enough.
- toyg 14y agoFat chance. It's already hellish to properly secure one JIT, a multiple-JIT browser would quickly look like Swiss cheese. Face it: unless something miraculous happens (like Microsoft, Mozilla, Google and Opera all agreeing on a brand new language), javascript will likely remain the only choice for "in-browser" UI development. Unless the browser gets replaced wholesale, we're screwed like that.
- hugh4life 14y ago"Not sure if im being ignorant here but surely this is a problem for most server side languages? PHP, Ruby, Go, Perl would all suffer the same problems." Python's main competition in the future will be Dart and ES.Next(the next version of JavaScript)... and maybe even Kotlin which has a JavaScript backend. "Why are people obsessed about creating a "jack of all trades" language instead of letting languages do what they do best?" Sometimes these languages do things better than the original languages that had their niche.
- dagw 14y agoPython's main competition in the future will be Dart Is there any indication that Dart developers want to move Dart outside of the web domain? Everything on their website is all about "HTML 5" and "web apps".
- wwwtyro 14y ago'Why are people obsessed about creating a "jack of all trades" language instead of letting languages do what they do best?' I can only speak for myself, but there is something extremely attractive about being able to do all of one project in a single language. A reduction in the overhead of context switches, perhaps? Fewer absent-minded semicolons in my python code? Correct me if I am wrong, but, isn't this a big part of the draw in Node.js?
- rom16384 14y agoI know what you mean. Coming from a Python background I first wrote Javascript in a Python-ish way. Now it's the other way around and I put semicolons at the end of the line, parentheses around logic clauses and use the wrong logic operators in my Python code. This because I work on both code bases simultaneously (Javascript on the client, Python on the server)...
- jaimebuelta 14y agoI have used regularly Python for backend and JavaScript for frontend at the same time (right now I am mainly using Python), and I never got those kind of cross-language problems... Curious...
- bstpierre 14y agoMost of the projects I work on require the use of several languages, and to me it's nice to be able to use the sharpest tool for each job. In a given day I might use one or more of C, C++, Python, sh (which possibly includes bits of sed/awk/etc), and make. In the not-far-distant past I switched between C, perl, python multiple times during the workday. The context switches aren't too jarring -- a stronger statement would be that I think it's easier to context-switch and use appropriate tools than it is to dance around a general purpose tool. E.g. substitution in perl or sed versus any other language.
- wwwtyro 14y agoYour point about sharper tools is absolutely fair and well-taken here. I wonder, though, are there diminishing returns when you have a language like Python that is a jack of so many trades? Is it worth the context switch for a tool that is only very slightly sharper?
- flyinRyan 14y ago>Js is clearly doing a fine job at client side programming, should we not be happy with that? I'm not happy with that. Lots of people want to say that the Web will one day replace native apps and this is precisely one of the reasons I hope that never happens: with a native App I can do the whole thing in one language. With the web I have to deal with HTML, CSS, <server side language > and Javascript for the client side. At the very least I'd like to be able to use <server side language> on the client as well. Why must we all be forced to use Javascript? It's not even a particularly nice language IMO. >That sounds like hell to a front-end developer. Its bad enough learning coffeescript or other dialects if a company uses them, but other languages too? What? Right now all languages either use a VM or they compile to assembly. Has that been so bad? If you read server side code you might be required to learn literally any language. Why should the client be different? My hope is that someone will come out with a VM browser plug in that lets me write in any language I want, compile to to a binary that runs on that VM, and this plug in eventually replaces Javascript as the defacto web language. Stop holding the browser client side programming environment hostage!
- romaniv 14y agoThat sounds like hell to a front-end developer. Its bad enough learning coffeescript or other dialects if a company uses them, but other languages too? As a full stack web developer I have to know multiple languages and constantly learn new ones. Why should front-end be any different? Ironically, one of the most common accusation I hear when someone speaks out against server-side JS is an accusation of not willing to learn new things. Double standards.