Live data from Hacker News

For modern development Javascript indeed is a shit language

live.julik.nl

141–150 of 243 posts

Re: For modern development Javascript indeed is a shit language

#141
- Unfortunatly you can complain all you want you'll have to write some javascript if you do front-end development. And today there are quite a lot of tools (transpilers,linters,etc...) that can help you with that.

Fortunalty you can chose the language you want on the server.

Re: For modern development Javascript indeed is a shit language

#142
You are holding it wrong.

No seriously, you might be trying to use a fast glue/prototyping/event processing and browser deployed language to do something that should be done in a different environment. If your core logic task is algorithmic, consider C or Go and call that from your event framework. If it's data integrity/type-safety related, consider using your sql dialect.

(not a flamebait, but nosql is just a big distraction, please seriously consider postgres, it rocks, esp with json and plpgsql stored procedures that can be used to enforce data integrity braces and as independent unit testing for your data structures)

AngularJS, Express, node, and postgres is the most potent combination I've used in a long time.

Cheers,and good luck! F

Re: For modern development Javascript indeed is a shit language

#143
post #125
post #76

Earlier quoted context omitted.

> JS is slow because JS is slow. JS is the fastest dynamic language next to SBCL's Common Lisp implementation. > JavaScript is not well designed for work in a team environment, nor is it well designed for Large Code Bases. Why is this a problem? Most web problems don't need a large code base. A small, dynamic language is suited to web problems. And judging by the amount of things being built with Javascript, enough p…

> Why is this a problem? Most web problems don't need a large code base. A small, dynamic language is suited to web problems. This is demonstrably false the second you start to use JS on the backend. Just because most of the problems you've seen require only tiny codebases does not mean that they all do.

Then use something else on the back end. Problem solved.

I'm saying the places you need JS and only JS are small. Have a larger problem? Use a statically typed language on the back end, and compile to JS on the front...

Re: For modern development Javascript indeed is a shit language

#144
post #88

Earlier quoted context omitted.

CoffeeScript was obviously inspired by Ruby. While CS is great, I've never gotten over the usage of "->" or "=>" to signify a function. To me, Ruby's "def" or "do" reads so much better. Especially with "end", to signify a barrier, as opposed to whitespace. Have you considered porting Ruby directly to JavaScript? By the way, thanks for your work on _ & Backbone!

People HAVE written Ruby -> Javascript compilers. Check out Opalrb, Redscript, Coldruby, Hotruby, Webruby... The -> comes from Haskell's lambda syntax (\x -> x+1). It's a nice solution. 'Def' doesn't really work for lambdas, do does, but curly-brace blocks are nicer in Ruby if you put them everwhere {|x| x+1}... Keep in mind that Javascript is alot like Scheme in that there isn't really a difference between named and…

Great points! I really want to check out Scheme now.

Re: For modern development Javascript indeed is a shit language

#145
post #68

Earlier quoted context omitted.

> No, it does not. You could define the exact same default function in Java, Haskell (requiring that the sorted type be a Show instance) or Python (hell, getting the exact same behavior in Python could hardly be simpler: `ar.sort(key=str)` I don't use JavaScript but to me this looks like a really broken implementation over weak typing. Of course, this isn't a trait of the typing system per se as it is a trait of the…

> this looks like a really broken implementation over weak typing No dammit, javascript does not coerce numbers to strings when comparing them, a "weak typing" implementation would behave exactly as he wants. > What OP was probably annoyed by was the typical excuse the JS community offers for this behaviour: "it's weakly-typed so you can treat the arguments as anything you want". That makes OP fractally wrong instead…

> No dammit, javascript does not coerce numbers to strings when comparing them, a "weak typing" implementation would behave exactly as he wants.

Please note that I wrote it's a broken implementation over weak typing, not of weak typing. The typing system is fine, at least as far as this matter is concerned, but the standard library is badly applied over it.

Re: For modern development Javascript indeed is a shit language

#147
post #18

For modern development of what ? Then don't use Javascript. I'm not sure I can really appreciate another rant about how one language, framework, pre–compiler, VM, etc is terrible and everyone should stop using it. Javascript's popularity has emerged organically. Its not because it has the best design. Its because it can get the job done and is browser based–and now server-side too. The browser is the next OS, the ult…

> Then don't use Javascript

Like people have the choice. "Dont like HTML ? so dont write it" sounds stupid doesnt it.

Re: For modern development Javascript indeed is a shit language

#148
post #123

Earlier quoted context omitted.

I'm afraid that there's not much to show yet, apart from some little prototype scribblings, and the basic idea: The web that we build for today is a rich, almost entirely backwards-compatible stew of nearly two decades of browser development and standards work, resulting in a triumvirate of very different languages that need to come together in order to make a web application happen: HTML + CSS + JS. Two of them are…

ActionScript!

Yeah, the hilarious part of that being that Adobe, even prior to Steve Jobs's "flash sux" response, had begun to wander away from a purely ActionScript model into declarative markup via Flex.

I'm not 100% certain that declarative is wrong for presentational information. It just sucks that HTML + CSS are so messy. I'd even go for something that had a more parsimonious (note: not coupled tho) relationship between presentation/structure.

Re: For modern development Javascript indeed is a shit language

#149

I'm so tired of hearing how bad JS is as a language - guess what, it doesn't metter. The ecosystem and community is absolutely amazing and that's something you just can't beat - all the well documented, polished and maintaned libraries, frameworks etc, the amount of books, guides, conferences and so on, the ability to use JS everywhere, tools, services, cloud based solutions and much, much more. That's why people cre…

Yeah, same here. I have no difficulty writing large scale apps in JS because I play to its strengths and manage its weaknesses. These shit-for-brains "experts" can't, and somehow it's all the language's fault.

Here's a clue folks: you're the programmer, it's your job to work out how to programme for your target platform, and if you can't then fuck off and leave it to the professionals.

Re: For modern development Javascript indeed is a shit language

#150
post #111
post #58

I have always wondered why so many people like dynamically types languages... I mean, if I have a variable I ALWAYS know what kind of data I expect in it. If I try to use different kinds of data in the same variable then something is clearly wrong - either with me (for wanting that) or with the way I use the variable (and I would appreciate some warning about it). The problem is that you hardly have a choice nowadays…

I have always wondered why so many people like dynamically types languages Because you don't have to write a lot of boilerplate to tell the language things that it should be able to figure out for itself. I mean, if I have a variable I ALWAYS know what kind of data I expect in it. But that data might not always be of the same type. For example, in Python, I might want a variable to hold strings but also None, so that…

> Because you don't have to write a lot of boilerplate to tell the language things that it should be able to figure out for itself.

This is exactly my point; compiler can't figure out what kind of data I want, at least not in general. A good example is jQuery $.data() which tries to guess what kind of data you have in your HTML tag attribute. Guess what happens if you have a MongoDB ObjectId (as string), for instance "52259986890d6f24e9000000"? Exactly - it is a floating number. Believe me, it leads to some interesting debugging sessions... :)

I agree with you however that it is beneficial to have a way to set the var to None/null/..., indicating "not initialized". Win some, lose some I guess.

Post reply on HN