Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Code is not a text string

Name: Anonymous 2014-04-26 7:33

Why does everyone think that source code can be stored in a text string? It's fucking 2014, you morons. The natural data structure for code is a tree, like in XML. Why do I have to put up with someone else's style conventions, superfluous comments, or with shitty generic syntax? If code was stored in XML, the IDE would be able to display it any way I want. One guy likes the {;} shit, another likes FIOC; one guy likes the faggot GNU style guide with a bunch of lines occupied by only one brace, while another likes the manly

void foo(int x) {
return; }


and so on.

So why the fuck is it still a one size fits all paradigm? It's not like a high school student can't write an XML parser these days. The days of Notepad are over. Besides, it's possible to output XML source code as text, as well as parse text code into XML form. So why the fuck is everyone still in the Stone Age? Either I am a genius, or everyone in the programming industry is an idiot.

Name: Anonymous 2014-04-26 16:46

>>8
Compare this:
void foo(int[] x,int j)
{
if(true)
{
//Lorem ipsum dolor sit amet, consectetur adipisicing elit
//sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
x[1]=get_fucked(x[2])+get_stoked(x[x[j]-2]);
//Ut enim ad minim veniam, quis nostrud exercitation
x[2]=get_fucked(x[3])+get_stoked(x[x[j]-2]);
//Ut enim ad minim veniam, quis nostrud exercitation
x[3]=get_fucked(x[4])+get_stoked(x[x[j]-2]);
}
}


with this:
void foo(int[] x, int j) {
if (true) {
//Lorem ipsum dolor sit amet, consectetur adipisicing elit
x[1] = get_fucked(x[2]) + get_stoked(x[x[j] - 2]);
x[2] = get_fucked(x[3]) + get_stoked(x[x[j] - 2]);
x[3] = get_fucked(x[4]) + get_stoked(x[x[j] - 2]); }}

I think the first version is as readable as a pile of shit, and someone else might think the opposite, but why does there have to be only one choice? It's the same piece of code, just viewed differently. With an underlying tree representation it's easy to display one and the same piece of code whichever way you like. It would even be possible to customize the syntax and make your code look like Symta without sacrificing any readability by others.

>>18
Restrict XML to just one tag and write that tag as a bracket. There you have it: s-exprs. That's why they're a degenerate form of XML.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List