Hacker News new | past | comments | ask | show | jobs | submit login

I've envisioned something like this even for written code. Basically unify the language and the editor, so that you could (theoretically) right-click on main() and say "add loop" and have the correct code auto-generated. Not because a mouse is somehow better (it's much worse in fact), but basically an editor/UI that only allows you to produce valid code.

Currently for most languages, we have: "type productions of a particular syntax and try really-really-hard to color between the lines, and subject yourself to the chinese-water-torture of syntax errors till YOU get better at it".

Why not invert that, whether via mouse input, a visual (as in literally, visual, not microsoft-visual) connection, or a text editor that simply doesn't let you type invalid productions. Like Intellisense, but taken to the function or block level. You cannot save the file or even leave insert mode until the code compiles. Or even better, you cannot even temporarily input invalid syntax. From the first keystroke, it inserts a variable declaration, click/type up or down to choose a function call, conrol structure, etc.

Some vim-like integration would go as follows:

command mode:

* <space>+F outputs a function called func1, auto-highlighted for you to rename (or accept default). * <space>+R on the func name lets you set its return type * <space>+A for args, * <space>+B to edit the function body

At no point would you be allowed to input non-compiling syntax. Things like indentation would be non-issues, set uniformly by defaults.




This is easier with a minimalistic (syntactically) language like Lisp. Check this out, the editor refuses to let you write code that won’t compile: http://danmidwood.com/content/2014/11/21/animated-paredit.ht...



yes, that is awesome. Now imagine connecting that to a machine-learning backend and letting it slowly train itself on how to write software. yes, I know ML doesn't need this vim-type language specifically, but it should help by only feeding it valid productions.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: