5 ms·
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".
by weltensturm 6y ago
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.
- jtwaleson 6y agoThis 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.
- piaste 6y agoDatabases 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.
- jtwaleson 6y agoYou can always figure a way to extract the logic, you will just need the runtime to execute it afterwards ;)
- kevincox 6y agoYou 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.
- dogfoods 6y agoYes, lots of people do things that are bad ideas.
- jtwaleson 6y agoPortability isn't the holy grail. To create working products, a lot of other things are important too.
- weltensturm 6y agoThese things are very vendor specific and proprietary, I was more thinking about general purpose programming languages.
- IBorodin 6y agoAlso SAP stores a lot of business logic in the database.
- feanaro 6y agoThere 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.
- deleted 6y ago[deleted]
- infinite8s 6y agoYou 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.