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

> If I were to invent a programming language for the 21st century, the main feature that would make people frown is that it would not be laid down in a flat text file.

Yes! It drives me crazy that due to a historical accident, we're still essentially writing programs as decks of 80-column punch cards. Nowadays the decks are virtual and the editing tools are better, but languages really haven't evolved to take advantage of modern I/O. I'll point out that the Xerox Alto (1973) let you write your source code with full WYSIWYG formatting (fonts, bold, italics, etc), so we've taken a step back since then.




I think that'd be useful for commenting but nothing else.

Whenever I see something in code, I wonder, what does this do? If I started seeing bold and italics and it did nothing but draw attention, I would almost certainly feel it a distraction.


> I think that'd be useful for commenting but nothing else.

But isn’t that a good enough use case?

Almost nobody bothers to put proper formatting, diagrams, tables, formulas, references etc in their source code. At best we get ASCII approximations.

To see some examples of what it could be like look at Mathematica, Jupyter, literate programming, and org-babel.


.. all of which require some kind of rendering software that has to actually be installed on your machine.


So do you need for images, photos, spreadsheets, PDF files, websites, schematics, board layouts, databases, mechanical drawings and models, neural network models, music masters, audio tracks, video footage and any other file format used by professionals.

Better yet, all the formats I mentioned are raw text and not even binary. And all have well developed tools for editing.


More than formatting, I am thinking about defining things like function and classes in a formatting-independent way, and dismissing the order of definitions totally.

You should have a list of classes and namespaces and not have to worry about how they are actually stored in flat files.


Yes, that too. There's no point imposing an order on functions and classes; I think that when you're looking at a function, related functions should somehow float nearby. (This doesn't seem to be a very popular view.)


Isn't it more useful if such marks like showing something in bold or a different color are automatically applied to classes of marks like identifiers or strings?




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

Search: