News for hackers. Stuff that matters.
Re:Always bet on text by narag on Tuesday October 14, 2014 @10:52AM (#8453659)
Why is text the "true" form?

It shouldn't. It's what the current IDEs do.

The difference is that the program is currently written as text and passed to the compiler, that expects text. The IDEs make a parallel construction to offer some goodies to the programmer.

How I think it should be: the IDE would actually do the syntax checking and reference resolving work, so any program you have written is in fact pre-validated.

There would be performance enhancements, but that's not the only advantage. One example that comes quickly to mind is applying macros, writing GUI generation wizards based on DB schema and in general applying "DRY".

Re:Always bet on text by icebraining on Tuesday October 14, 2014 @04:30PM (#8455602)
How I think it should be: the IDE would actually do the syntax checking and reference resolving work, so any program you have written is in fact pre-validated.

But IDEs already do that. An example I'm familiar with is Java on Eclipse - it validates the code as you're writing it and marking compilation errors. Your others example have been done as well.

You're right that you need an AST to do the properly, but when there's a cheap and reliable way to convert a blob of text to an AST - parsing - the distinction is somewhat irrelevant.

Re:Always bet on text by narag on Wednesday October 15, 2014 @06:18AM (#8457784)
You are arguing that the fallout is manageable. I'd like to simply do it right from the start.
Re:Always bet on text by icebraining on Wednesday October 15, 2014 @07:20AM (#8457909)
No, I'm saying it's an irrelevant implementation detail.