4 ms·
With 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
by ahoge 11y ago
With 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 agoAs I explained, requiring an IDE to make effective use of a language is a marker for a complex language. The system as a whole may be an effective way to build programs for some people, but it's now more than a language. The logical extreme is visual programming which reappears every few years. After a while, most people rediscover that languages articulate concepts better than visual metaphors. IDEs aren't as extreme, but sometimes don't merely enhance editing the language, but become almost a required part of the language. I am sure Martin Odersky can write Scala programs in Notepad, but I myself cannot write a Scala program without mouse hovers explaining the inferred type of my variable. It's an effective total programming system, but as a pure language, it's so complex I can only program it in a certain environment.
- hackinthebochs 11y agoBut why is environment flexibility a requirement? When are you genuinely constrained to use, say, only a terminal? I can think of no situation where this is true by necessity (rather than artificial constraint).
- hughw 11y agoWell, first of all, I am not against IDEs. I use one most days of the week, and I'm productive in it. Some of the above discussion has misinterpreted my remarks. I only ever said, that a language making itself amenable to IDEs isn't a convincer for me, since languages requiring tooling to be effective are possibly less good as languages. So when somebody tells me Typescript is good because IDEs can autocomplete it, it's an unconvincing argument to me, since I prefer JavaScript which, having no type annotations, has less typing and little need for autocomplete in the first place. I didn't even bring up environment flexibility, or terminals! Since you asked, though, it is fairly nice to be able to ssh in to a box and make a code change, and recompile, for those languages that require that. Continuing with Scala as an example, I, myself, could not edit a Scala program extensively without benefit of an IDE. So say I have a Scala program sitting on a dev server where I'm building a batch image processing program. If Scala were as simple as Jacascript, I could easily use vi or emacs to iterate the development remotely. As it is, I edit and test locally on my laptop using an IDE, then push this big jar over to the server. So, there are plenty of cases where remote edit, compile, test cycle using a terminal is convenient.
- hughw 11y agoI do appreciate the type inference.