Earlier quoted context omitted.
Elm is extremely exciting. Whenever I get frustrated with js I fire up an elm app I have been working on just to see those beautiful compiler errors. Seriously though, Elm's error reporting is best in class.
It's nice to fire up an old Elm app and be able to make changes immediately. Not just because of the compiler errors, but also because of its other limitations, like having your effects isolated via `Cmd`s and ports.
TypeScript Seals My Penchant for JavaScript
121–130 of 133 posts
Re: TypeScript Seals My Penchant for JavaScript
#122Earlier quoted context omitted.
I have a solution for hardcoded spaces that is sure to blow your mind.
8 charwidth tabs in Go are a sight to behold - what decade is this?
Re: TypeScript Seals My Penchant for JavaScript
#123Earlier quoted context omitted.
Best thing about JavaScript is the speed of development. Once you master it, all other languages & ecosystems feel verbose, archaic. Modern JS (ES2015+) combined with a code style (Standard, Airbnb) is beautiful, sometimes more so than Python. Bad modules isn't a problem inherent to JS. NPM has its faults, but the JS community is the largest, and the fastest moving of all. Everything you need already exists, and it's…
"Best thing about JavaScript is the speed of development. Once you master it, all other languages & ecosystems feel verbose, archaic." That is pure opinion.
Re: TypeScript Seals My Penchant for JavaScript
#124I love JS/ES2016 how it is, I seriosuly don't see the advantage of typescript except maybe for a gigantic application
> seriosuly Well, if English were statically typed, the compiler would have caught your spelling mistake before you submitted your comment. Types are valuable for any size application. They bring order to a chaotic world. If you don't do static typing, you have to do a lot more unit testing. You also have to type out a lot of code to convert your function arguments into the types that you actually wanted. So, you're…
Re: TypeScript Seals My Penchant for JavaScript
#125Earlier quoted context omitted.
What do you mean by closure in this case?
Closures are functions that can capture values/references visible in the scope where the function is defined/instantiated. They are basically a short hand way of creating function objects, functions which have data members.
Classes themselves can hold multiple functions/methods, and if you want a function that carries state, maybe a generator would be useful?
Re: TypeScript Seals My Penchant for JavaScript
#126Earlier quoted context omitted.
Can we have a rational discussion about web technologies without resorting to insults and ad hominem attacks on an entire "generation"?
Rational? This is a discussion about hating a language for silly reasons. They must let the hate out or they'll be bitter forever.
And please, if you believe you are above those ad-hominem attacks, don't use them yourself.
Re: TypeScript Seals My Penchant for JavaScript
#127Earlier quoted context omitted.
You mean the so-called "Standard" code style? Not many people use it. Why even list it...and first? Airbnb style is the most popular one by far. This bears repeating whenever the so-called "Standard" js style is mentioned, lest any readers think that it's actually a standard that people use. It's not. Every time it's been introduced on HN, it's been roundly criticized for the name and the lack of semi-colons. I'm not…
Standard is a very nice style and makes for very readable code, especially for those with more of a functional background. (Standard makes JS [and TS too with tslint-config-standard] feel a lot more like the OCaml relative that it is.) Just because you don't like the name, don't think it is "popular", doesn't mean that no one is using it or likes it. (I like it a lot, personally.)
Re: TypeScript Seals My Penchant for JavaScript
#128Earlier quoted context omitted.
Oh, I'm sorry, I didn't get the memo that says if you work in Javascript you have to use npm. Did that become mandatory in ES2015 or ES2016? But again, you are blaming the tool for the bad things people do with the tool.
Are you using npm? How many js developers use it around you? 90%? 95%? As I said in my previous comment it does not make difference in the end whether the tool is bad or the language. If I have to use that tool to leverage the good parts of the ecosystem (eg. use all the libraries in nmp) I can either choose not to use it and lose the the advantages of it or choose to use it and have a crap software which is in the h…
As for the taking over packages problem, that's an easy thing to prevent. You can use the tools from npm without allowing that private company from messing you up. Download and use them locally.
Re: TypeScript Seals My Penchant for JavaScript
#129Earlier quoted context omitted.
Rational? This is a discussion about hating a language for silly reasons. They must let the hate out or they'll be bitter forever.
While there are plenty of things to be said about JavaScript and its ecosystem which I very much doubt you could dismiss as silly, this discussion is about Electron. Meaning, an entire browser runtime being shipped to power a simple desktop appliaction, for a small developer benefit over other cross-platform toolkits and to great detriment for the users. And please, if you believe you are above those ad-hominem attac…
And exactly where was my ad-hominem attack?
Re: TypeScript Seals My Penchant for JavaScript
#130Earlier quoted context omitted.
Closures are functions that can capture values/references visible in the scope where the function is defined/instantiated. They are basically a short hand way of creating function objects, functions which have data members.
I believe all functions are object in python, so you can add attributes to them, but you'd be better of creating a class with a __call__ method. Relevant scope can be captured in the class __init__. Classes themselves can hold multiple functions/methods, and if you want a function that carries state, maybe a generator would be useful?