[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax
From: |
parasti |
Subject: |
Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax |
Date: |
Wed, 14 Mar 2007 23:49:54 +0200 |
User-agent: |
Icedove 1.5.0.9 (X11/20061220) |
Paolo Bonzini wrote:
> The exclamation point is going to remain exactly for interactive
> sessions. Remember that -- anyway -- what's badly needed is, as Mike
> pointed out earlier in this thread, nothing more than an easily parsable
> syntax that denotes the *structure* of the program rather than how to
> reconstruct it.
>
> That's the main reason why I am suspicious of syntaxes that are
> pure Smalltalk. It looks to me, though I might be wrong, that
> having "Object subclass: #MyClass!" is as bad as having
> "Object methodsFor: 'abc'!". If somebody just adds a new method
> like
>
> refine
> "Define a subclass of self, with the same name, in the current
> namespace."
> self environment = Namespace current ifTrue: [ self halt ].
> self subclass: self name!
>
> how can you expect things to be parsed correctly when one writes:
>
> Set refine!
> Set comment: 'not your ordinary set'!
>
Sorry, but you've got me confused. What you've said above is the exact
opposite of what I understand by "scripting". Scripting is an
interpreted dynamic on-the-fly kind of thing. What I see above is a
static resolve-all-symbols-at-compile-time kind of thing, which
incidentally reminds me of a certain language. I don't think there is
difference between "denoting structure" and "reconstruction" of a
program in a scripting environment. In fact, I think there shouldn't
be. I understand why there's a need for something better than
#methodsFor:, but the rest is just way out there, more useful for
compiler writers than language users. Python's a scripting language:
>>> f = lambda a, b: a + b + c
>>> f(3, 4)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in <lambda>
NameError: global name 'c' is not defined
>>> c = 5
>>> f(3, 4)
12
>>>
Note how a reference to an undefined variable is an execution-time
exception. That's the direction I'd like to see GNU Smalltalk heading.
Best,
Jānis
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, (continued)
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/12
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, parasti, 2007/03/12
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/13
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Stewart Stremler, 2007/03/13
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/13
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Stewart Stremler, 2007/03/14
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Mike Anderson, 2007/03/13
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, parasti, 2007/03/13
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Stephen Compall, 2007/03/13
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/14
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax,
parasti <=
- [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/15
- [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax, parasti, 2007/03/16
- [Help-smalltalk] Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), Paolo Bonzini, 2007/03/16
- [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), parasti, 2007/03/17
- Re: [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), Paolo Bonzini, 2007/03/18
- Re: [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), parasti, 2007/03/18
- Re: [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), Paolo Bonzini, 2007/03/19
- Re: [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), parasti, 2007/03/19
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Mike Anderson, 2007/03/14
- [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/15