7 ms·
im rly in love with typescript right now, looking forward to es6!
by hoare 11y ago
im rly in love with typescript right now, looking forward to es6!
- hughw 11y agoI just had my first exposure to Typescript recently, and the only part I liked was the fact that it allowed me to mix in plain old, untyped js syntax. TS, used as TS, feels verbose, like java, with lots of extra keyboard-typing to create a simple program.
- ahoge 11y agoWith optionally typed languages like Dart and TypeScript, you only have to add types to things like fields and functions/methods to get all the tooling benefits. Type inference takes care of the rest. Secondly, you should be able to auto-complete pretty much everything.
- hughw 11y ago"you should be able to auto-complete pretty much everything" Requires tooling.
- discreteevent 11y agoEh.. grep is also a tool? Every function you write is a tool. The whole industry is built on tools and tools that make tools..
- hughw 11y agoSure. But programming languages whose claim to utility lies in an IDE -- they aren't necessarily bad, but it's not a programming language you're selling me, it's a whole environment: MS Visual Studio or whatever. A complex language requires lots of tooling like that, and a simple language doesn't. I have never missed autocompletion in Javascript, but I cannot function without IDE support in Scala. We're off the topic of OO in Javascript, but I wanted to make the point that I don't automatically consider that "IDEs can autocomplete" is a positive feature -- if you need autocomplete, that's a problem.
- ahoge 11y ago> but it's not a programming language you're selling me, it's a whole environment Well, yes, because programming languages don't exist in a vacuum. The currently available libraries, tools, and documentation are very important if you decide to actually do something with that language. > I have never missed autocompletion in Javascript A moment ago, you complained about having to press a few more keys for the type annotations. > I wanted to make the point that I don't automatically consider that "IDEs can autocomplete" is a positive feature That there are IDEs which let you auto-complete everything is a positive feature. Being toolable doesn't mean that those tools exist. If those tools exist, you can make use of them if you decide to use this language. This is a good thing. By the way, JavaScript doesn't lack good tooling because it doesn't need good tooling. It's the way it is, because offering good tooling for JavaScript is really difficult. ES6's modules and classes will help with that though. The tools will make good use of this statically available information.
- hughw 11y ago>> I have never missed autocompletion in Javascript >A moment ago, you complained about having to press a few more keys for the type annotations." For Typescript, I dislike the extra typing. I have never missed autocompletion in Javascript. Where is the contradiction?
- ahoge 11y agoOne would think that 20 additional characters per function don't really matter if you can save 100 keystrokes. Compared to JavaScript, I have to press fewer keys when I write Dart. (This would be also true without shorthands like method cascades.)
- hackinthebochs 11y agoWhat's with this luddite mentality that pervades some areas of software? This meme that epitomizes terminal-based, mouseless, IDE-less development is just seriously absurd. We of all people should embrace modern tools that make development more productive. Tooling is the future, we should be pushing the envelope not romanticizing the past.
- hughw 11y agoI do appreciate the type inference.
- edwinnathaniel 11y agoI don't know about you but my experience with Java required me to type either the same or less than JS if we are comparing apple vs apple, not simple front end vs complicated back end.
- grayrest 11y agoAre you counting Java IDE keystrokes or actual number of characters on the screen? If it's the latter, I'd be interested in seeing an example since it's very much against the wisdom of the crowds here. My experience is that the complicated part web app is the part that does the state coordination, which can be either end.
- edwinnathaniel 11y agoJava IDE of course. Not the number of characters on the screen.
- hackinthebochs 11y ago>with lots of extra keyboard-typing to create a simple program. When people say this as a knock against a language I can't help but wonder how they got so far in their careers using only two fingers. Now, if you want to say that verbosity obscures intent and expressivity, then that's a fine argument to make (you'll have an steep hill to climb to show that types are an instance of this however). But if your development is bottlenecked by your typing speed, there's something seriously wrong.
- hughw 11y agoIt's both. I'm a poor typist, and more importantly, the terser the better. The less screen noise you have to filter, the clearer the picture becomes. I also put high value on DRY.