[lrs] Re: thoughts on Tea

  • From: Newberry Family <newberry@xxxxxxxxxxxx>
  • To: <lrs@xxxxxxxxxxxxx>
  • Date: Wed, 19 Sep 2001 15:20:13 -0700

Thanks for responding, Adrian.

on 9/17/01 9:54 PM, Adrian Sampson at adrian_s@xxxxxxx wrote:
> Yum?

Heh.

>Oh, I see.

:P

> I think I vaguely recall spouting this off long ago, but here's some exam=
ples
> I thought of with an easily-interpetable code in mind. However, this does
> make the code itself quite ugly...

Though an easily interpretted langauge would be nice for me, I would rather
make the user of the langauge's life easier.

> [command|parameters]
> [command|param1,param2]
> [command|[function|parameter]]
> =8A and setting variables =8A
> [set|(var),value]

This reminds me of LISP. Not that I know LISP or anything, but I do know
that is makes heavy use of parens and nested parens, similar to how you use
brackets here.

I must say, though, that the SET command was never my favorite. I think I'd
rather stray toward C-type mechanisms than BASIC ones. In terms of the core
langauge, I don't really see how BASIC is that much easier than C... I'm no=
t
sure if there's anything a beginner to programming could do in BASIC that
they couldn't do in C if they had a reference next to them.

> To make it cleaner, you could:
> [command|
> parameter,
> parameter,
> [function|
> parameter,
> ]
> parameter,
> ]
> But that gets big and scary fast.

Yeah... I guess I find the prior example more readable. Perhaps indentation
would make it read better.

> Anyway, that really didn't last long after I tried to write a simple scri=
pt in
> it.

Heh. :)

> - Adrian "Read on for more translation=8A" Sampson
>=20
>=20
> msgBox "Hi!"
> [msgBox|"Hi!"]
>=20
> s =3D "Hi!"
> msgBox s
> [set|(s),"Hi!"]
> [msgBox|s]
>=20
> for x =3D 1 to 10
> msgBox str(10)
> next
> [for|
> [set|(x),1],
> [set|(x),x+1],
> << no clue what would go here to replace "x<=3D10" >>,
> {
> [msgBox|
> [str|x],
> ]
> }
> ]
>=20
> 3 lines to 10? Hmm... This could use some retooling.

The main thing, though, is whether or not the code is cleaner or nicer to
write. I'm not sure. The encapsulation of the various routines is
interesting, though...

Thanks for the input,
-David


Other related posts: