[Tfug] Language choices

Bexley Hall bexley401 at yahoo.com
Mon Nov 13 11:01:21 MST 2006


Hi, Tim,

> I think you're right about less syntax being better,
> and less nonpronounceable syntax being better yet.
> Of course, there is tradeoff,

Of course.  :>  Nuttin' for nuttin'...

> yes?  What if having a single, consistent syntax
> "trick" (as all punctuation
> in programming is a trick) meant that you could have
> a fraction of the syntax overall (pronounceable and
> not)?
> 
> This is the thing about
>     x<1 IfTrue: [ do something ]
>           ifFalse: [do something ]
> that I find appealing.  You don't have to add
> "if..else..then..elseif" to
> your syntax. The only syntax we have here is:
>     object message
>     object message: parameter

This is the Smalltalk-80 approach.  It lends itself
well to my OS (which is object based and message
passing) but I'm not sure that *alone* would cinch the
deal for it.

> Or more complex:
>     20 To: 50 Step: 5 [ doSomething ]
> Is actually a method on the integer class called
> To:Step: that takes a "to"
> parameter, a "step" parameter, and a "callable"
> 
> this looks funny the first time you see it, but not
> nearly as weird as "DIM
> A as CHAR[100]", or "for(int i = 10; i<50; i++)"

The problem (with both) is the syntax is clumsy.
The former assumes a lot (on the behalf of the
reader/writer); the latter clutters up the code
with stuff that really doesn't *need* to be there.

Recall:  "scripting language".  Why should the user
have to dimension arrays?  Declare the types of
variables, etc.?  This is the big appeal of languages
like REXX, AWK, etc.
 
> The idea that everything (expressions and variables)
> are all objects, and
> all programming is sending messages with objects
> parameters is very simple, and far-reaching in
power.


Yes -- and dovetails nicely with my OS model.
I.e. a remote procedure just looks like yet
another "object" that you want to send a
message to (yuck!  bad grammar)


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com




More information about the tfug mailing list