This gives me an idea: somebody should make an inverse intellisense that lets you type as if a function exists that you haven’t created yet, and instead of using a bunch of red squigglies and making you feel like a fool for typing broken code, offers you a shortcut to create the code that doesn’t exist yet.
Bonus points if it uses the language’s type inference to inform what to create, like:
String s = foo.bar(someInt);
Would offer a quick way to make the stub: // (class of foo)
String bar(int someInt) {
// TODO
}
There’s probably tons of ways to make this super ergonomic too, maybe with an easy keyboard shortcut (maybe if ctrl+space triggers intellisense, ctrl+enter could trigger the “make stub” functionality) and could work quickly and with no fuss. The method just gets added in the background, you don’t even see it, you just get to keep typing out your train of thought.This could be extended to more than just methods, but whole classes/structs/etc.
I know IDE’s have lots of affordances for creating new code from templates/quick actions, but there would be something magical about being able to just type out your mental model at the current abstraction layer, all at once without distraction, and have the IDE better help you “make real” the code you just referenced.