3 ms·
"Code completion" can mean many different things, from very basic features to more advanced ones. Many "lightweight" tools I've seen lack the more useful parts
by realharo 6y ago
"Code completion" can mean many different things, from very basic features to more advanced ones. Many "lightweight" tools I've seen lack the more useful parts and offer only really basic completion.
For example if a function in a library I'm using is called `createUserWithSubscription`, and I start typing `usersub` anywhere in the project, it should offer that function near or at the top of the suggestion list, even if its location is not already imported/included in my current file. Things like that have a huge impact on easy discoverability of a library's functionality, which in turn has a huge impact on productivity and speed of adopting new technology.
If I just press Ctrl+space while the cursor is inside a function call, without typing anything, it should offer suggestions based on what other code passes into that function, or suggestions based on the type of the argument, etc. I don't recall these things from 20 years ago. And that is still just one of the features.
>coding a business app as a webpage or as an Electron app is not any faster than making it in VB6 or Delphi was
I would say it is. Of course the apps made today are very different from the apps back then, but making UI that displays data is much easier.
- jfkebwjsbx 6y agoThe kind of features you are describing existed two decades ago, in several IDEs, in one way or another, and for the most part do not require huge amounts of CPU/memory. Definitely not 2 orders of magnitude more. > Of course the apps made today are very different from the apps back then, but making UI that displays data is much easier. How so? Both VB6 and Delphi were designed to display and edit data quickly. Its main use case was creating business apps very quickly and both had WYSIWYG GUI designers in the IDE itself! There were menus, buttons, lists, tables, tree displays, rich-text editors and many other ready-to-use controls. You had adaptors for different databases, OLE for embedded documents, COM support, etc. You could display images, video, sound too. Even commercial games were developed on them.
- realharo 6y agoNone of that matters when once you need to display a list of items (where every item has its own group of UI widgets), you have to start dealing with a whole bunch of clunky model wrappers, and even basic features like sorting and filtering require special care. Not to mention keeping all the UI in sync when one piece of data that is displayed in more than one place changes. Instead of just doing <> <h1>List of items</h1> {items .filter(itemFilter) .map(item => <div> {/* UI for the individual item, e.g. name, subtitle, icon, buttons, etc. */ } </div>)} </> that also keeps the displayed data current no matter what - new data comes in from network, the filter in the search textbox changes, it all stays in sync...
- jfkebwjsbx 6y agoI don't understand what you are talking about. What is so special about receiving data and displaying UI controls from it? Networked apps, business apps, database frontends, etc. have been a thing since the 80’s, and I am not even talking about that but IDEs from the 90’s and later. The code you show is identical to what was done back then in many languages, many frameworks and many systems. Filtering, sorting, per-item UI, multi-views, synchronization, etc. has been always a basic need. The web is yet another UI/app framework. Nothing less, nothing more.
- realharo 6y agoMy point is that in environments like old-school Delphi or VB, or even with frameworks like Qt, those things take way more effort and boilerplate code than they should. For exapmle in Qt you have to either subclass QAbstractListModel or use QStandardItemModel with weird QStandardItem wrappers around your data, then you have QSortFilterProxyModel (https://doc.qt.io/qt-5/qsortfilterproxymodel.html https://doc.qt.io/qt-5/qsortfilterproxymodel.html) and all that weirdness. And then for the actual UI of the individual items, you have QAbstractItemDelegate, etc. https://doc.qt.io/qt-5/qabstractitemdelegate.html https://doc.qt.io/qt-5/qabstractitemdelegate.html I mean, just look at this example: https://doc.qt.io/qt-5/qtwidgets-itemviews-stardelegate-example.html https://doc.qt.io/qt-5/qtwidgets-itemviews-stardelegate-exam... No way that should take that much code.
- jfkebwjsbx 6y agoIf you say so. I have worked professionally in quite a few UI frameworks and they are pretty much the same. The web is actually one of the most complex ones out there due to the never ending frameworks and libraries that come into fashion every other year. Old environments had a defined set of things to use and learn and things were stable for many years. In Qt you can build your UI on the fly with code without using those classes if that is what you are asking.
- realharo 6y ago