Hi Josh!
> My goal was the essays is ultimately not to provide a solution but to
> provoke discussion.
You succeeded. :)
I feel I was one of the two most vocal critics of your position (or,
better, make finer distinctions and claim that I was the most vocal
critic of your position and Bart was the most articulate) so I'd like to
start by delineating where I agree and where I disagree.
> I feel like programming languages have stagnated. We keep polishing
> our pointy corners until they are perfectly round rather than going
> off to explore new worlds.
100% agree.
> Reading through the threads here I'm happy to see people engaged in
> actual discussion of the merits of my ideas, rather than just saying
> "it won't work".
100% agree.
>
> One of the people on the other thread mentioned that many of these
> ideas have been tried before. This is very true. I've been recently
> reading through all of the papers I can find in structured and visual
> programming and finding interesting stuff. However, the end result is
> rather depressing. Virtually everything in today's "new languages" is
> at least 30 years old. It feels like we continue to recycle the past.
95% agree.
> My essays are an attempt to spark discussion on unexplored
> possibilities but vast majority of the reaction has been to
> essentially say "don't fix what ain't broke"
That would characterize my position as well. Or, to borrow a phase from
you a few paragraphs above, I would say that if your concern are as you
state them, we oughtn't waste effort "polishing our pointy corners until
they are perfectly round." Textual storage of source code is a mostly
rounded corner.
It is, however, a very attractive trap for would be language designers
-- so much so that it's the very first item on the checklist
http://colinm.org/language_checklist.html :
You appear to believe that:
[ ] Syntax is what makes programming difficult
> . (I could diverge here into a larger essay on how the western world
> can no longer dream and do big things, but that might be a bit too off
> topic).
Agree, except that I'm not sure it would be off topic.
> Regarding my specific suggestion that we don't store code as plain
> text, my point is not to advocate a database or some other technology
> in particular.
Understood.
> It is to highlight how stagnant we have become. Just during my
> professional career (and I graduated in 97) we've had about 8 cycles
> of Moore's law, and yet I still see programmers arguing about whether
> the overhead of garbage collection is worth it. I have a *phone* with
> a 1.4GHz processor and a gig of RAM!! The world has changed
> drastically but the way we right programs hasn't. In fact we fall
> further and further behind each year.
Agree, but with a significantly longer baseline and a slightly different
take on the social and technological mechanisms.
> So..., from the postulate that surely we won't store our code as plain
> text 100 years from now,
I strongly doubt the truth of this postulate.
> let's go exploring. If we are thinking of our code as a graph rather
> than a plain text syntax, what does this open up?
Worms. Cans and cans of them. :)
More specifically, language is the serialization of annotated graphs
(e.g. Chomsky). That's the whole point of having language in the first
place. When we "think of code" we of course think of it as a richly
annotated graph, but when we communicate/store it we must use a language
to serialize it. And from your previous statements I'll take the
liberty of inferring that this mandatory serialization is really what
you object to, so you are asking, in effect, either
"What would happen if our canonical serialization wasn't serial?"
or
"What would it be like if we could write programs that weren't
expressible in any language?"
> Inline resources? Non-ascii characters as part of the language? Draw
> part of your code instead of writing it? I feel like there's a lot of
> stuff in here waiting to be explored.
And, as Bart pointed out and you are discovering, much of it has been
explored. Repeatedly. That's no reason not to explore it again, but it
may be worthwhile to look into why / how previous efforts floundered
too.
I'd like to offer a counter proposal: if your concerns are as you state
them, look at the areas where programming has ratcheted forward. In
almost every case, the pattern has been remarkably similar:
* Existing programs either don't deal with some problem space X,
or they do so in an ad hoc manner and an inordinate amount of
the program's complexity is tied up in dealing with it (though
this is almost never evident except in hindsight).
* Some ways of dealing with X are better and eventually become
enshrined in common practice
* Some of the adhoc code to do X "as you do" gets extracted into
libraries, and more programs that "didn't need X" discover that
they do.
* Some languages start to provide first class support for X
(either directly or as ubiquitous, low-friction libraries) and
suddenly languages that don't support X seem fusty and hard to
work with.
So examples of this, in very rough chronological order: integers, sub
routines, arrays, source code, structs, variables, looping structures,
recursion, floats, characters, fixed size strings, I/O, files,
indexing/dbs, booleans, quasi-variable length strings, namespaces,
garbage collection, objects, regular expressions, hash dictionaries,
networking, etc.
.
Some things that seem to keep getting reinvented but not sticking in any
widely adopted final form: trees, graphs, sets, pure functions, fuzzy
values/confidence intervals, units, exception handling, parallelism,
first class serialization, enumerations, baked in security, validity
testing/proving, rationals, complex numbers, vectors, structural pattern
matching, speculative execution, separation of concerns, etc. These for
the most part seem to be mired in the first half of the process, though
there have been languages that gave first class status to most of them.
I would posit that the reason things take 30 years to make it into
languages is that these steps take a lot of brain power and most people
who are in a position to address them are more concerned with other
goals. If you want to move the state of the art forward, I'd suggest a
more productive approach would be to pay attention to the unwanted
complexity on current code written in modern languages and try to
abstract some facility that would turn that into a solved problem.
Going from:
int found = 0
for (i = 0; i < length(s); i++) {
if (s[i] == 'a') {
int j = i+1
while (s[j] >= '0' && s[j] <= '9') { j++ }
if (s[j] == 'b') { found = 1; break }
}
}
if (found) { ...
to
if s =~ /a(\d*)b/ ...
was a major step forward.
If you can find and abstract even one similar pattern you'll advance the
art more (IMHO) than anything you'll get by mucking about with the
serialization syntax.
> BTW: I live in Eugene. I'd love to come up for a pdxfunc meeting
> sometime.
I get down to Eugene occasionally, and would love to get together for
lunch some time.
-- Markus