Post Reply 
newRPL: Making RPL more readable
12-02-2016, 02:20 PM
Post: #4
RE: newRPL: Making RPL more readable
(12-02-2016 12:39 PM)Han Wrote:  I suppose I am a bit more conservative with respect to the syntax. As more features are added (whether for legibility or ease of use), the language becomes a mixed bag of pre- and post-fix and coding becomes an exercise in which command uses which syntax.

Good point. There needs to be limits to the changes, and any new syntax needs to be more natural than the old, otherwise there's no point. I'm with you in keeping it clean.

(12-02-2016 12:39 PM)Han Wrote:  Is:

obj 'name' LSTO

that much more legible than:

LOCAL 'name' obj

(do note that it takes a few more characters to type LOCAL vs LSTO). If the obj is large then neither case really has an advantage over the other.

In the example I proposed, no. But in larger programs, reading the name of the subroutine *before* the code gives you much more understanding of what you are reading, especially if you are reading it on a small screen.
You see:
Code:

<<
LOCAL 'Average'
<<
...

And you know the code that follows is a subroutine named Average, and you can decide if you want to read it or skip over that code into more interesting things.
Versus:
Code:

<<
<<
...

In this case you need to scroll all the way to the end of the code to see if the coder even bothered naming it.

For simple variables I agree there's no advantage:
4 'a' LSTO and LOCAL 'a' 4 is about the same thing because you can see it all at once.

I guess the same could be achieved simply by reversing the arguments:
Code:

'Average'
<<
...
>>
LSTO

Could work as well. I think I could add that if Level 1 is not an IDENT but level 2 is, then STO and LSTO would simply reverse the arguments. The only ambiguous case would be if two idents are given, in such case the classic syntax would prevail.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: Making RPL more readable - Han - 12-02-2016, 12:39 PM
RE: newRPL: Making RPL more readable - Claudio L. - 12-02-2016 02:20 PM
RE: newRPL: Making RPL more readable - Han - 12-07-2016, 07:37 AM
RE: newRPL: Making RPL more readable - Han - 12-07-2016, 10:12 PM
RE: newRPL: Making RPL more readable - Han - 12-05-2016, 07:43 PM



User(s) browsing this thread: 1 Guest(s)