

Language design: Turtles all the way down, please - cstejerean
http://weblog.raganwald.com/2008/02/turtles-all-way-down-please.html

======
dfranke
_Of course, there would also be things like this:

2 = 3

Which would now pass blithely though the parser only to raise a NoMethodError
at run time because numbers do not implement an update method (At least, not
in Ruby. Legend has it that this was legal in early versions of FORTRAN._

I recall a friend telling me a long time ago that REXX allowed this, but he no
longer remembers and I can't verify.

~~~
derefr
When I read the "lvalues and references" part, I thought about functional
programming and equivalence. That is, an interpreter where you can state:

    
    
        f(g(h(x))) = n
    

and any time the first was mentioned, it would be substituted with the second,
and vice versa, whichever allows the evaluator to simplify to a greater
extent.

Then, thinking further, are there any programming languages that rely on the
sorts of math where f(f^-1(x)) is simplified to x without being evaluated?

~~~
jey
" _Then, thinking further, are there any programming languages that rely on
the sorts of math where f(f^-1(x)) is simplified to x without being
evaluated?_ "

Mathematica?

------
davidw
I've always taken "turtles all the way down" to mean the fixation that
Lisp/Forth/Scheme/Smalltalk/etc... people get about implementing _everything_
in their language of choice, all the way down to the OS and even silicon if
they can. This is almost always an enormous waste of time (unless the goal is
only to have fun and learn) and of no import to your 'average user'. The
scripting language guys came along and got popular because they concentrated
on what their languages were good at, and happily interacted with C (and now
Java).

Also:

> I think it's a good thing when languages are highly consistent, in the vein
> of Scheme, Smalltalk, and Forth

Yes and no. It's very elegant, but in the end, I'm not convinced that that's
what (most) people really want. Elegant is often a thing to be admired from
afar, rather than something you use every day. I'm also in agreement with
Larry Wall that sometimes these languages get too hung up on their Elegant
Paradigm and forget to be practical.

~~~
shiro
As a programmer who've used Lisp and Scheme for commercial projects, I object
to that, although I admit there's a tendency in the circles of these languages
that pursue ideals obsessibly.

However, "turtles all the way down" has also very practical implications. I
have been saved more than once because Lisp/Scheme have the way to tweak very
low-level stuff within it so that I can tune the whole program to meet the
performance requirements without changing the large structure of the program.
And don't take the Scheme guy's discussion about Elegance by their word---we
know that tools of day-to-day jobs has to have a kind of dirtiness (I don't
despise that; in fact, I rather like to play with lower bits, UI, or legacy
workflow,...). We only believe that keeping an eye on the ideal will serve as
a long-term guide.

~~~
davidw
I don't mean that _everyone_ is that obsessed; suffice it to say that enough
people have the mentality that they want their entire environment to be in
Lisp/Scheme/Smalltalk (the last of which is pretty much that way by design) to
have created a culture that is, on average, more concerned with that kind of
thing than the scripting languages were - they were too busy getting things
done, piggybacking on Unix, C, and Windows to some degree. Note that the Java
people have also gone in big for 'turtles all the way down', but that's easier
with millions of Sun dollars at your back.

My point wasn't that Scheme/Lisp/etc... are impractical languages, or unusable
for real work, but more along the lines of "ok, these are great languages,
languages that have changed the way everyone thought - so why aren't they more
popular? What went wrong?"

One very specific example - I recall fooling around with Scheme a while ago,
and the implementation I was using didn't even have a string-split (string ->
list). Easy to implement? Sure, but also evidence that it wasn't being used
for the sort of practical things I wanted to do with it.

~~~
shiro
Your point taken.

If you feel to taste Scheme again, check out mine <http://practical-
scheme.net/gauche/> . It has string-split :) Seriously, it aims at being a
handy tool for day-to-day scripting.

------
gruseom
I'm interested in these ideas too. But when there's a clear, obvious
antecedent to the discussion it seems to me that it should be cited.

[http://www.google.com/search?hl=en&rlz=1B3GGGL_enCA237CA...](http://www.google.com/search?hl=en&rlz=1B3GGGL_enCA237CA238&q=turtles+avi+bryant&btnG=Search)

~~~
raganwald
Ok, here it is:

<http://en.wikipedia.org/wiki/Turtles_all_the_way_down>

~~~
gruseom
With all due respect, that's misleading. I'm talking about the application of
the turtles meme to a very specific software idea, the one which Alan Kay
called recursive design and that you happen to be writing about. As far as I
am aware, this particular use of the turtles metaphor was introduced by Avi
Bryant in a 2005 post and popularized by him in various interviews since.
Surely credit should be given where it is due, especially when an idea has a
well-defined origin. It's like writing a whole post about Blub without
mentioning "Beating the Averages".

(While it is true that the wikipedia page contains a reference to Bryant at
the bottom, it's a very obscure reference, and this could hardly be a more
specific idea. It's very possible that Avi got it from someone else in the
Smalltalk world, but if anyone knows of an earlier published reference I'd be
curious to see it.)

~~~
raganwald
If I am responding directly to someone, I will link to them. If I think
there's value to be added for the reader, I will also link to an essay like
that.

Other than that, I do _not_ insert links and footnotes and citations into
every blog post. The footnotes would outnumber the paragraphs if not the
sentences.

Should I link to Alan Kay every time I discuss objects? How is that different?
Or for that matter, if someone discusses the signal-to-noise ratio in
programming language idioms, must they mention a post I wrote that was popular
at the time?

And FYI, I have written about Blub and linked to Paul's essay as well as
written about Blub without linking to Paul's essay. You are right, the two
things are exactly the same and I have treated them the same way.

I choose to link or cite when I think it improves the reader's experience. In
this case, I didn't think so, and after re-reading AVi's post, I still don't
think a link belongs in my post. You could force it in, perhaps by adding a
post script "If you find this interesting, you may also like..." or by adding
a parenthetical remark "(TAWDry languages have other benefits, like...)."

But you know, that isn't what you are arguing. You do not appear to be arguing
that a citation would improve the user experience of the post. Or at least,
that's not how it reads. Your comment reads like I have written a scholarly
paper and violated the rules of citation. Is that really what you are saying
here?

There is a saying that I will attribute to Jerry Kaplan (since I read it in
the forward to his book "Startup"):

"Your ideas will go further if you don't insist on going along with them."

Avi hasn't emailed to insist that he go along with that metaphor. Which is
probably part of why it is spreading.

~~~
gruseom
The value to the reader of being pointed in a rich new direction is obvious.

I'm not saying that you wrote a scholarly paper. I'm saying you introduced a
(fairly esoteric) metaphor with a clear and unambiguous origin and failed to
mention it; that struck me as ungracious. As for "forcing it in", it couldn't
be more relevant. You named your post after it.

~~~
raganwald
> ungracious

Oh goodness me, that word is redolent of drawing rooms and mannerly discourse.

I present you with two options:

1\. There is a comment feature on the post, and it permits you to include
hyperlinks. Help yourself. That's exactly what the comments are for, to allow
_you_ to suggest avenues of investigation for other readers.

2\. If you think there's a rich connection that ought to be mined in prose,
write a blog post and go into as much detail as you think appropriate. I'd
like to read it.

~~~
gruseom
_That's exactly what the comments are for_

Good idea! Don't know why I didn't think of that.

