5 ms·
> The code editing experience is totally structured, where you select choices from menus rather than typing Very cool! I wish there were something like this fo
by aragonite 3y ago
> The code editing experience is totally structured, where you select choices from menus rather than typing
Very cool! I wish there were something like this for working adult programmers, a general purpose structured editor for programming languages. When I program the intentions I form are in the first instance semantic (define a function here, check a condition there). Why shouldn't I just directly communicate my semantic intentions to the editor? Why do I have to first serialize my intentions into a string for the editor to then parse, in a error-prone process which introduces the possibility of silly syntactic errors like typos, mismatched brackets, operator precedence errors etc, rather than just semantic incorrectness?
Such an editor wouldn't necessarily have to be keyboard unfriendly any more than Excel is keyboard unfriendly. I guess it could also work something like input method editors for East Asian languages where you type into a "composition window" and make selections from a "candidate window" for insertion.
- saurik 3y agoI am under the impression that this is what people who program in Lisp experience when working with Emacs, where they get to think in and work with forms rather than mere text.
- hyperthesis 3y agoASTs
- jerf 3y agoMany have tried this. It is definitely not in the class of "nobody else has thought of this" so much as "tons of people have thought of this and tried it and smash up against some major problems right away". AIUI, in this case, the major issue is that it is very tempting to try to impose a constraint that all intermediate states the code passes through are semantically valid. However while superficially appealing this turns out to be a crippling constraint. Even the best of us tend to think in somewhat more sloppy terms and then fix up code after the fact, even on a line-by-line basis. Being forced to be completely valid 100% of the time turns out to be a big mismatch. I am inclined to believe this mismatch is fundamental. Only vanishing fractions of a percent of humans, if any, think this way. Even professional mathematicians report that they tend to work this way in practice, in that they tend to leap ahead and then back-fill the rigor, rather than strictly working forward one step at a time, and if even they don't work in this manner, who does? Programming has settled on semantically-aware autocomplete and suggestions, and that's probably the actual optimum, not just a symptom of some kind of laziness. It is possible that if somebody really pushed through the development that the problems are solvable, but I'd advise anyone taking it on that if there's any fruit here, and there may well be, it is not low hanging. As saurik mentioned, the Lisp world through emacs is the closest you can get to this, but again AIUI you can still do anything you want, it's just that you have a lot of tools that encourage "more" semanticness, not that it is enforced absolutely rigidly.
- hyperthesis 3y agoA related concept is compilers that keep going after the first error. Though I kind of like the hard-mode idea of a compiler that has only one error message, "fail". BTW: could provide valid options (perhaps highlighted), not constraints. (...maybe been thought of already)
- george_____t 3y ago> AIUI, in this case, the major issue is that it is very tempting to try to impose a constraint that all intermediate states the code passes through are semantically valid. However while superficially appealing this turns out to be a crippling constraint. This really isn't much of an issue in a language with holes as a first class concept, like Agda or Haskell.
- jjkaczor 3y agoYou wish there was something like this for adult programmers? Blythe Omnis 7 in ... (checks CV/resume) ...1996 (and earlier), a 'RAD' platform/solution that worked across Windows and Macintosh... (I landed the job because I was the ONLY candidate who had even heard of this software, because I read a short article in a magazine once...) https://en.wikipedia.org/wiki/Omnis_Studio https://en.wikipedia.org/wiki/Omnis_Studio Clicking to program with drop-down lists (and popups) just wasn't all that well thought out. So - you would see your program as a listing. When you tried to edit a line, it would popup a modal dialog box, where you could edit... just that one line... Intellisense/code-completion were of course non-existent... ahahahahaha (laughs maniacally) Man, I think my PTSD is kicking in, I need a drink/smoke or something.
- solardev 3y agoAren't there quite a few of these? Scratch or its cousin Snap (https://snap.berkeley.edu/snap/snap.html https://snap.berkeley.edu/snap/snap.html), or even a visual flow editor for React (https://app.flowhub.io/#project/c111454c9fd2f74d37d1e8a4e739adfd/c111454c9fd2f74d37d1e8a4e739adfd%2Fnoflo https://app.flowhub.io/#project/c111454c9fd2f74d37d1e8a4e739...) or the similar https://retejs.org/ https://retejs.org/
- b4rtazz 3y agoFor example https://github.com/nocode-js/sequential-workflow-designer https://github.com/nocode-js/sequential-workflow-designer is designed in this way, that you program some logic by setting predefined actions in a proper order. You program at the high level.