Earlier quoted context omitted.
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".
Node.js and the new web front-end
141–150 of 163 posts
Re: Node.js and the new web front-end
#142Re: Node.js and the new web front-end
#143Earlier quoted context omitted.
What's so good about TypeScript's type system and what problem does it solve?
Almost no one realizes this, but the main purpose of TypeScript is to negate one of JavaScript's greatest advantages which is the lack of typing. This is an advantage because it makes code easier to write and read. The problem that TypeScript solves is that the web platform is in direct conflict with Microsoft's monopolies in PC gaming and business productivity software (Office). Confusing developers into thinking th…
Re: Node.js and the new web front-end
#144Earlier quoted context omitted.
Almost no one realizes this, but the main purpose of TypeScript is to negate one of JavaScript's greatest advantages which is the lack of typing. This is an advantage because it makes code easier to write and read. The problem that TypeScript solves is that the web platform is in direct conflict with Microsoft's monopolies in PC gaming and business productivity software (Office). Confusing developers into thinking th…
I think optional typing is better than no typing. It's useful for allowing APIs to be self documenting. It seems as if optional typing is going to get more and more popular. For example, see Google's optional typing in dart, where they actually recommend to not use types for local variables: https://www.dartlang.org/articles/style-guide/#type-annotati...
Re: Node.js and the new web front-end
#145> 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…
> I believed, and still do believe, that statically typed languages are exactly what you want in the guts of your business logic.
He wasn't making a case against javascript for his shopping cart but rather against dynamic languages.
Now, you could certainly disagree with that as well, but it opens the discussion to a more correct one vs why you believe javascript is a mature language. Something the author actually agrees with.
Re: Node.js and the new web front-end
#146Earlier quoted context omitted.
Okay, aside from some scientific functions, what do you really need from an integer that 52bits isn't enough for?
It's not about storing large numbers, but math precision. For example: 0.3 * 3 => 0.8999999999999999 A few rounding mistakes and you have a huge mess.
And the example you have given is a problem with all floating point implementations, not just Javascript. You will get that exact same answer in C, Java, etc.
The only way to avoid this is to represent rational numbers directly, without simplification. For example:
(3/10) * 3 => (9/10)Re: Node.js and the new web front-end
#147Earlier quoted context omitted.
I think optional typing is better than no typing. It's useful for allowing APIs to be self documenting. It seems as if optional typing is going to get more and more popular. For example, see Google's optional typing in dart, where they actually recommend to not use types for local variables: https://www.dartlang.org/articles/style-guide/#type-annotati...
I am not sure. I think that descriptive identifiers can indicate the type and be augmented by documentation.
Re: Node.js and the new web front-end
#148Earlier quoted context omitted.
It's not about storing large numbers, but math precision. For example: 0.3 * 3 => 0.8999999999999999 A few rounding mistakes and you have a huge mess.
You seemed to have jumped from talking about integers to floating point! And the example you have given is a problem with all floating point implementations, not just Javascript. You will get that exact same answer in C, Java, etc. The only way to avoid this is to represent rational numbers directly, without simplification. For example: (3/10) * 3 => (9/10)
In the example given, using node-bignum and assuming our precision is a thousand of a cent:
big(30000).mul(3) => 90000
Of course you'd get the same result in plain javascript with these numbers, but then you'd have to handle everywhere an operation could return decimals, and using bignum you have "unlimited" precision > 52bits.Re: Node.js and the new web front-end
#149Earlier quoted context omitted.
What's the big deal with getting bignum into js? Everything else I can agree with, but not having 64bit int support in a server side language has to hurt. (just look at most node db adapters and bigints are handled as strings)
Okay, aside from some scientific functions, what do you really need from an integer that 52bits isn't enough for?
Re: Node.js and the new web front-end
#150Earlier quoted context omitted.
Almost no one realizes this, but the main purpose of TypeScript is to negate one of JavaScript's greatest advantages which is the lack of typing. This is an advantage because it makes code easier to write and read. The problem that TypeScript solves is that the web platform is in direct conflict with Microsoft's monopolies in PC gaming and business productivity software (Office). Confusing developers into thinking th…
The "Open Web" is closed to one single language choice that was made for you by someone else. TypeScript is being developed, because Microsoft adapts to where the world is moving and they are just trying to avert the disaster that will happen when enterprises will actually start trying developing whole applications in JS. And Google is developing a higher-order version language as well. Nobody developed a language to…
Clojure? Scala?