News for hackers. Stuff that matters.
Re:Ask HN: What's the next big thing in computing / programm... by jakobnissen on Monday December 20, 2021 @02:45PM (#29629219)
I think people will soon realize that code is a data structure, not text.

Like a hash map or an array, its text representation is merely a human-readable interface to it. I predict the capabilities of IDEs will expand, and to make their state persistent, they will begin to store IDE-specific files in your source code directory. Eventually this will morph into the source code itself being stored in binary format and opened/searched by editors.

The programming language Unity is pioneering in this domain, but they are too far ahead of their time. The transition to code-as-data will be gradual.

Re:Ask HN: What's the next big thing in computing / programm... by oumua_don17 on Monday December 20, 2021 @03:43PM (#29630046)
>> people will soon realize that code is a data structure, not text

Are you being tongue in cheek because most haven’t realised it in 63 years!!!

[1] https://en.wikipedia.org/wiki/Lisp_(programming_language)

Re:Ask HN: What's the next big thing in computing / programm... by feoren on Monday December 20, 2021 @05:53PM (#29631558)
When I see people talking about storing code in an AST representation or something similar, I see people who are focusing on the "happy path" and not really thinking about why code-as-text has been so sticky for half a century.

(1) Code spends a huge amount of time in a non-parsable state. I need to be able to save code even when it's not currently parsable into a valid AST of the language I am writing. Sometimes I even need to check in this code to my source control. You cannot have the primary storage of your code be valid, parsed syntax trees for this reason, so you need to invent a brand new format that is different from both text and the AST being modeled. This format needs to be optimized for programmer workflow, clarity, and communication; not optimized for the machine.

(2) You need to re-invent how source control works for your representation if you're not using text. This actually has a lot of potential -- syntax-aware merging done well would be a godsend. But this is a huge undertaking to do well, and problem 1 rears its head strongly here as well.

Re:Ask HN: What's the next big thing in computing / programm... by hcs on Tuesday December 21, 2021 @06:25AM (#29636305)
> (1) Code spends a huge amount of time in a non-parsable state.

One way to attack this is via holes, as in https://hazel.org/

Re:Ask HN: What's the next big thing in computing / programm... by drainyard on Tuesday December 21, 2021 @02:48AM (#29635011)
> (2)

Have you heard of https://dion.systems/ that was linked here recently? They are working towards going away from text as the source format.

It remains to be seen whether or not it is a good idea and/or if it will succeed if it is.

> (1)

I guess in something like Dion, you have a source format that doesn't allow syntax errors, since you are not editing something that can be in an invalid state (necessarily).

Re:Ask HN: What's the next big thing in computing / programm... by mcphage on Monday December 20, 2021 @04:35PM (#29630613)
> I think people will soon realize that code is a data structure, not text.

Always 5 years out, like nuclear fusion. :-(

Re:Ask HN: What's the next big thing in computing / programm... by chudi on Monday December 20, 2021 @06:46PM (#29632004)
So you mean smalltalk or lisp?