KBD

Keith Devens .com

Saturday, August 30, 2008 Flag waving
If you rely on scale up, you’ll probably get killed. You should always be relying on scale out. – Phil Smoot
← DVD writer recommendations?Strange Women Lying in Ponds: Why Federal "Tort Reform" Is an Unconservative Idea →

Daily link icon Tuesday, January 18, 2005

Subtext - non text-based programming language

Subtext, a non text-based programming language, via this comment on ./. I'm watching the demo now. It reminds me of this video on Self. Though while I found the Self video fascinating, this video on Subtext just makes Subtext seem like a toy.

Dumbest comment in the video: "My long-term goal is to decriminalize copy & paste. It's a natural way we want to program, so let's embrace it in our programming languages."

The author takes pride in the fact that Subtext programs aren't text. Of course, no programs are text -- text is just our static representation of the program. I'm highly skeptical that his representation, with his drag and drop linking programming interface thing, is more efficient or more natural for programmers to work with than plain text.

Also see his silly discussion about functions returning multiple values starting at about 7:55 in the video (look guy, C is not the state of the art in programming languages, ok?), which leads into his mention of the dreaded "local variable naming" problem.

And boy, he really does use his copy & paste philosophy throughout the video. Of course, it takes him about half the video to write a factorial function using his method. Now, it is pretty neat that his code is always executing as he writes it[1]. And it is neat that a lot of the dependencies within the program are linked explicitly rather than having to be discovered through static textual analysis as an IDE like Eclipse would do. In fact, I take it that that was the subject of his OOPSLA paper (PDF), which I'd like to take a look at when I get the chance. But, I think he misses the mark and fails to do anything actually useful with this experiment[2]. Though, I'll give him another chance to explain when I read his paper.

Finally, he makes a fairly big deal that the names in his programs aren't actually semantic entities, but merely comments that serve to annotate the "living program" or whatever. I think he's fooling himself if he thinks that's a real difference, let alone an advantage, of his system compared to other programming languages.

Update: Hans is more interested than I am. Also, just to clarify: I think it's a neat system, I'm all for investigating new approaches to programming, and I commend its author for doing so. I'm just doubtful that what I watched in the demo video has application in realistic systems.

Footnotes:
[1]: though, of course, this is only neat. It's probably equally useful to have a REPL, and of course the neat-ness of this is limited to simple functions that take little time to calculate and, it seems to me, don't have side effects.
[2]: Regarding IDEs and program analysis: One of the conclusions that I got out of The IDE Divide was that the expressiveness of a language is inversely proportional to how useful IDE refactoring tools are. The more expressive your language, the less necessary a good IDE becomes. Of course, it's natural for Java that it's a huge market for such IDEs.

← DVD writer recommendations?Strange Women Lying in Ponds: Why Federal "Tort Reform" Is an Unconservative Idea →

Comments XML gif

Hans (http://zephyrfalcon.org/) wrote:

"""Finally, he makes a fairly big deal that the names in his programs aren't actually semantic entities, but merely comments that serve to annotate the "living program" or whatever. I think he's fooling himself if he thinks that's a real difference, let alone an advantage, of his system compared to other programming languages."""

I think there's an important difference. In most "conventional" languages, you use names to refer to types, variables, data structures, etc. Of course, deep down it's the data structures (and functions, etc) that are used, not the names. But you still need the names to refer to them. ... In Subtext, on the other hand, you simply copy existing data structures. Names are irrelevant: you don't need them to refer to anything; rather, you use the data structures themselves. The name becomes merely a comment, for the programmer's convenience. The fact that names don't need to be unique illustrates this.

∴ Hans | 18-Jan-2005 11:31pm est | http://zephyrfalcon.org/ | #6866

Keith (http://keithdevens.com/) wrote:

Of course, deep down it's the data structures (and functions, etc) that are used, not the names.

My point was that names are irrelevant to the compiler/interpreter, and are utimately there for human consumption. That's the same between Subtext and any other language. You're definitely right that there's a difference in that Subtext doesn't actually use the names in its compilation/execution, but I meant that I don't think it makes much of a difference in how you actually program. You're going to have to pick names for things anyway for your program to be comprehensible. The one advantage I can see (as far as naming) is that, as he pointed out, you can often do away with temporaries.

What do you think... am I missing something?

Keith | 19-Jan-2005 8:14am est | http://keithdevens.com/ | #6868

G wrote:

I didn't see anything that got me excited. Using an editor like that would be a pain. But it's really not much different than something like Visual Studio with it's collapsable sections. It did get me thinking that editors that displayed code in more UML-like fashion might be kind of neat - display all the objects, click on one, then click on a function and edit it.

BTW, what do you consider to be the more expressive languages?

∴ G | 19-Jan-2005 4:36pm est | #6869

Aggelos (http://www.bsd.gr/~agorf/) wrote:

It sure is something different and new (at least to me), but in no way easier, more comfortable, user/human-friendlier that textual programming. And I don't think it will ever be.

∴ Aggelos | 19-Jan-2005 4:39pm est | http://www.bsd.gr/~agorf/ | #6870

Keith (http://keithdevens.com/) wrote:

Indeed. I don't know how anything can be more efficient than plain text. Plain text can of course be augmented with language-aware tools, like an IDE that can display dropdowns of built-in or defined functions, tell you if you've used a variable before you've defined it, generate object interaction graphs, have a built-in debugger that lets you mess with running code, and so on.

But it's really not much different than something like Visual Studio with it's collapsable sections.

Code folding wasn't the point. The folds were, among other things, actually showing successive levels of function application.

...display all the objects, click on one, then click on a function and edit it.

Watch the Self video.

BTW, what do you consider to be the more expressive languages?

I assume you're referring to my reference to C and multiple return values. I'd list languages like Perl, Python, Ruby, Lisp, among others as being more expressive languages.

Keith | 19-Jan-2005 9:48pm est | http://keithdevens.com/ | #6872

G wrote:

> ...display all the objects, click on one, then click on a function and edit it.

Watch the Self video.

I did. Nothing very UMLish. I'm thinking more like Visio or something.

∴ G | 19-Jan-2005 10:52pm est | #6873

Keith (http://keithdevens.com/) wrote:

Keith | 9-May-2005 10:51pm est | http://keithdevens.com/ | #7622

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

August 2008
SunMonTueWedThuFriSat
 12
3456789
10111213141516
17181920212223
24252627282930
31 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 2 posts

Recent comments XML

new⇒Johnny Walker Blue Label

Wow, thanks for the scotch review​:D

Lagavulin and Laphroaig are​some of...

Keith: Aug 29, 3:35pm

Girls, please don't get breast implants

Wow, After all this time, the​comments on this page continue to​grow. It wa...

Ajeet: Aug 25, 2:36am

Generated in about 0.227s.

(Used 8 db queries)

mobile phone