RE: Language without a name
"Brian Foote" <[email protected]> Fri, 17 Jun 2005 11:28:25 -0500
| Newsgroups | gmane.comp.programming.emergent-design |
|---|---|
| Message-ID | <[email protected]> |
I like languages too. As for the history, are you sure we're not talking about James Noble's PLoPD4 chapter? I wish I'd written that one, but James did. I wrote another language called Ego (which was actually quite similar to James's) about ten years ago, but I'm at a loss as to how you'd have seen it. I'm not sure what to say about the code except that I too am partial to Self/Smalltalk syntax, and dynamic languages. hurl: is a good name for what one does to an exception. I realized the other day that my dog takes somewhat the same approach to type checking as do dynamic languages. When in doubt, eat it. If it is indigestible, she knows she'll just cough it back up in a few minutes... Are there other amenities in your code that you'd like to point out? --BF, on the porch with the dog... -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Michael Feathers Sent: Thursday, 16 June, 2005 18:51 To: [email protected] Subject: [emergentdesign] Language without a name Here's a chance to talk about something emergent.. I like languages. For fun, I've been writing an interpreter for a new one. It is sort of a prototype-based mix of Smalltalk and Python syntax. I've had a fascination with prototype-based languages ever since I read Brian Foote's Prototype Pattern (maybe before) and typed in his Ego interpreter. Right now, I have a tokenizer that is indentation aware and I'm building up recognizers for the phrase structure. I'm doing it test-first and I don't have much of a sense of what the architecture of the interpreter will be, but it seems to be coming along fine. If anyone wants to see the code, feel free to ask. I don't plan on making it a very useful language. The world is littered with those already ;) I've been using the folowing example code as a guide while I work. It's code I expect the interpreter to accept. false ifTrue: aBlock pass false ifFalse: aBlock aBlock value true ifTrue: aBlock aBlock value true ifFalse: aBlock pass test tests := list clone test setUp pass test tearDown pass self runTest self should: false test should: aBool aBool ifFalse: self hurl: "bad things" test run: aResult self do: self setUp self runTest self tearDown ifUnable: e | aResult addMessage: e divTest := test clone divTest runTest: aResult self should: ((10 / 2) = 5) testSuite add: test self tests add: test testSuite run: aResult self tests do: aTest | aTest run: aResult object slots self _ object clone result | self slots forEach: slot | result slots add: slot result Michael Feathers > Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/emergentdesign/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/