Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There will never be anything that is as portable as text, and I think that is the sole reason we will never see any other widespread method of storing "code".

Imagine having to update to a new language version if the code is blobs, I feel sick already. And all the language vendor specific software you'd need just to do anything with it in general.



This might surprise you, but a huge amount of business logic is already stored in databases etc rather than in text based code repositories. There are lots of enterprises that have platforms (e.g. Salesforce) that allow you to build things without code.


Databases can usually be exported as, and rebuilt from, some kind of plain text format - be it CSVs, JSON, DDL+DML scripts.

Of course it's less efficient than using the vendor's native dumps. But it's still important that the option exists, because it means that, in a worst case scenario, you can unfuck your data with text-based tools ranging from notepad to enterprise distributed buzzword ETL.


You can come up with a plain text format for any data. The more interesting question is the day to day use.

Right now for most programmers we general work in an editor which does little over the text representation and sometimes edit the first directly as text. We also review code almost entirely as a diff of text. The only exception to this is that we break the text into multiple files and handle each somewhat separately.

This is in start contrast to SAP or Salesforce where the primary interaction is with a specialized UI which treats the "code" more as a graph than text. And dumping to text is primarily used as a backup and is rarely interacted with in that form.


You can always figure a way to extract the logic, you will just need the runtime to execute it afterwards ;)


These things are very vendor specific and proprietary, I was more thinking about general purpose programming languages.


Also SAP stores a lot of business logic in the database.


Yes, lots of people do things that are bad ideas.


Portability isn't the holy grail. To create working products, a lot of other things are important too.


You do realize that text is just streams of binary data. Its just our entire ecosystem/tooling has evolved to interpret continuous streams of that binary data as text documents.


There is no reason not to store the text as a canonical representation alongside an alternative AST representation. A valid AST can always be rendered as valid source code and valid source code can always be parsed back into an AST.

So if the AST format changes incompatibly, you simply need to let the compiler regenerate it from the source code.




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

Search: