Live data from Hacker News

Node.js and the new web front-end

nczonline.net

91–100 of 163 posts

Re: Node.js and the new web front-end

#91
post #81
post #77

> I was never a fan of PHP Interesting how the same people who are "not fans" of PHP somehow like Javascript. As if it's better.

Are you claiming to have an objective yardstick for comparing the goodness of languages? (Don't answer that.) If not, please remember that different languages are just that -- different, not necessarily better or worse. Personal attitudes towards the differences between languages are totally normal. Bearing this in mind will help the conversation proceed in a more civil manner.

> "not necessarily better or worse"

I don't agree with that. Sure, comparing something from completely different domains (for example, SQL and HTML) doesn't make sense. However, for some languages (e.g. C#/Java, Python/Ruby, etc.) it is entirely possible to compare them and point out which is better in some aspects or worse in others.

What I'm saying is that Javascript and PHP are comparable (now that node.js exists and it's possible to write server-side javascript), however, I don't see much advantage over PHP other than being more trendy.

Re: Node.js and the new web front-end

#92
post #76
post #61

Earlier quoted context omitted.

I think Typescript solves a lot of these problems. The type system is amazing, conversions are explicit. Syntax is slightly improved, built-in class system. The others I don't really mind: I like writing event-loop code over threads, and have never once run into Object.prototype problems in the wild.

What's so good about TypeScript's type system and what problem does it solve?

Problems like I look at a function and have no clue about what it's arguments are.

Re: Node.js and the new web front-end

#93
post #72

Earlier quoted context omitted.

Is it actually impossible to query the DB asynchronously in PHP?

Not impossible, but not easy either considering PHP is single-threaded and synchronous.

I've never heard of languages being synchronous or asynchronous before. It looks like PHP ships with asynchronous DB APIs.

Re: Node.js and the new web front-end

#94
post #88
post #56

Earlier quoted context omitted.

It doesn't have an adequate type system. There are too many silent conversions. The syntax is very clunky. All the object systems feel hacky and they can't be relied on to interoperate with each other. Problems like no standardized threading support or decimal type could be resolved in the future. But the language as it exists currently lets you override everything, and that's the sort of thing that you can't remove…

Java and .NET are the only strongly typed languages used heavily as a web backend. Python, PHP, Ruby, and Node.js are all weakly typed.

Yeah this strikes me as the usual "language X sucks, because dynamic languages suck".

Re: Node.js and the new web front-end

#95
Unless youre dealing with a large complex app or scalability is a major concern I dont see how adding an extra nodejs vestige is worth all the trouble. Take the coolness of node out of the equation and not much compelling arguments are left from a business value perspective.

Re: Node.js and the new web front-end

#96
post #88
post #56

Earlier quoted context omitted.

It doesn't have an adequate type system. There are too many silent conversions. The syntax is very clunky. All the object systems feel hacky and they can't be relied on to interoperate with each other. Problems like no standardized threading support or decimal type could be resolved in the future. But the language as it exists currently lets you override everything, and that's the sort of thing that you can't remove…

Java and .NET are the only strongly typed languages used heavily as a web backend. Python, PHP, Ruby, and Node.js are all weakly typed.

You are confusing dynamic/static vs strong/weak typing.

Re: Node.js and the new web front-end

#97
post #88
post #56

Earlier quoted context omitted.

It doesn't have an adequate type system. There are too many silent conversions. The syntax is very clunky. All the object systems feel hacky and they can't be relied on to interoperate with each other. Problems like no standardized threading support or decimal type could be resolved in the future. But the language as it exists currently lets you override everything, and that's the sort of thing that you can't remove…

Java and .NET are the only strongly typed languages used heavily as a web backend. Python, PHP, Ruby, and Node.js are all weakly typed.

I think python & ruby are considered strongly typed, whereas javascript is weakly typed. strong/weak usually refers to implicit conversion or not.

Re: Node.js and the new web front-end

#99
post #76
post #61

Earlier quoted context omitted.

I think Typescript solves a lot of these problems. The type system is amazing, conversions are explicit. Syntax is slightly improved, built-in class system. The others I don't really mind: I like writing event-loop code over threads, and have never once run into Object.prototype problems in the wild.

What's so good about TypeScript's type system and what problem does it solve?

In general, I believe it will help make larger JS codebases more maintainable. Specifically it enhances the following:

- Refactoring e.g. easily globally change a class member's name

- Type safety e.g. it will bark if you pass a string where an int is expected

- General IDE handyness e.g. 'Go to definition'

A really good demo here: http://channel9.msdn.com/Events/Build/2013/3-314

Re: Node.js and the new web front-end

#100
post #56

> As much as I love JavaScript, there are just some things I don’t want written in JavaScript – my shopping cart, for example. After developing almost exclusively in JavaScript for the better part of the past year (and doing a lot more in the previous 6), I'm convinced that this mentality is going to start fading as more and more developers become more capable and productive with JavaScript. There's nothing inherentl…

It doesn't have an adequate type system. There are too many silent conversions. The syntax is very clunky. All the object systems feel hacky and they can't be relied on to interoperate with each other. Problems like no standardized threading support or decimal type could be resolved in the future. But the language as it exists currently lets you override everything, and that's the sort of thing that you can't remove…

Almost every shopping cart in existence right now is written in PHP, Python or Ruby, and they have much of the same "issues". Write tests, use a good bignum library, maintain code standards. Syntax is subjective, I find it pretty nice when following a certain style.

Almost nobody modifies Object.prototype, and we now have plenty of APIs to deal with that - defineProperty, seal, freeze, etc.

Post reply on HN