New topic: 

New name, time for some syntax changes?

<http://forums.realsoftware.com/viewtopic.php?t=47693>

         Page 1 of 1
   [ 7 posts ]                 Previous topic | Next topic          Author  
Message        timhare          Post subject: New name, time for some syntax 
changes?Posted: Wed Apr 24, 2013 2:06 pm                         
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12262
Location: Portland, OR  USA                I have been opposed to syntax 
changes in the past, especially importing C-isms into the language.  But one 
thing I WOULD like to see is this:

Allow an optional semicolon at the end of a line of code.

On the one hand, that would ease the transition from other languages that 
require a trailing semicolon.  On the other hand, it would allow for this:

Allow multiple statements on a line.

This would allow us to conserve vertical space.  I would find it especially 
useful when initializing variables.

X = 1
Y = 5
Z = 7

Could become

X = 1; Y = 5; Z = 7;

What do y'all think?  Have I become a heretic?

Tim   
                             Top                languer          Post subject: 
Re: New name, time for some syntax changes?Posted: Wed Apr 24, 2013 2:41 pm     
                    
Joined: Wed Feb 16, 2011 1:59 pm
Posts: 66
Location: Arizona, USA                One vote for you. Everything else is 
changing, that tiny bit wouldn't hurt. It actually makes it more productive.    
  
_________________
Windows XP SP3
RS 2012r2  
                             Top                Jason_Adams          Post 
subject: Re: New name, time for some syntax changes?Posted: Wed Apr 24, 2013 
2:44 pm                                 
Joined: Fri Nov 10, 2006 4:10 pm
Posts: 1794
Location: Michigan, USA                You know, I've used a number of 
languages (C, Pascal, SQL, etc.) that use the semicolon to separate commands, 
but I hardly ever used it to squeeze more code onto a single line. I just 
rarely find myself wishing this was possible outside of situations where it is:
If Foo Then Bar = 1 Else Bar = 2

Where I did enjoy semicolons was in massive commands that spanned multiple 
lines (especially in SQL):
select
  avg(numcolumn) as num_avg
  string_agg(textcolumn, ',') as text_csv
  
  FROM sometable
  
  ORDER BY
  id_col1
  id_col2;


You can do this in RS (now Xojo), but have to use the underscore, and lose the 
ability to organize with tabs. But that's the whole point: If you don't know 
what you're looking for, a semicolon can be confusing, hard to find, and easy 
to forget. It also takes away from the simple, visual presentation of the 
editor. For my use, semicolons would have to be required and the whole 
auto-tabbing system removed. I'm happy with it as is.

Sorry, Tim, I guess I think you're a heretic.     
_________________
Windows 7 Ultimate x64
Windows XP Pro SP3
Ubuntu 11.04 via Virtual Box
RS Enterprise 2012r1.1

Programming Tutorials & Free Projects: http://www.JasonTheAdams.com
"Christianity has not been tried and found wanting; it has been found difficult 
and not tried." - G.K. Chesterton  
                             Top                mbierly          Post subject: 
Re: New name, time for some syntax changes?Posted: Wed Apr 24, 2013 2:49 pm     
                    
Joined: Mon Jun 21, 2010 9:25 pm
Posts: 11
Location: Warfordsburg, PA                Yep. Definitely a heretic.  

I've used Pascal/Delphi for a long, long time and don't miss the semicolons one 
bit!      
_________________
Regards,

Mike B.  
                             Top                markwalsh          Post 
subject: Re: New name, time for some syntax changes?Posted: Wed Apr 24, 2013 
3:02 pm                         
Joined: Wed May 20, 2009 4:43 pm
Posts: 954                timhare wrote:What do y'all think?  Have I become a 
heretic?
Coming from anyone but you, I would have expected the responses to be 'This has 
been covered before', 'Real Basic/Studio/Xojo is not [other programming 
language]', etc.

Personally, I often prefer vertical space to jamming things into a single line, 
even when there are single line alternatives. Back in my VBA days, I would 
format my function calls with each parameter on a separate line for clarity. 
And, I never was a fan of Javascript's 
Quote:var x = (value=== "Green") ? "Go" : "Stop"; I'd rather use the following, 
as I find it easier to read:
Quote:If (value == "Green") {
   x = "Go"
} else {
   x = "Stop"
}
But, it wouldn't matter to me if it was part of the language, I just wouln't 
use it much, if at all, myself. Just as long as we're not required to end each 
line that way (I have gotten in the habit of doing so in Javascript, but I 
often find myself missing a few every now and then.)      
_________________
RB 2009r4 Windows XP  
                             Top                Paul Lefebvre          Post 
subject: Re: New name, time for some syntax changes?Posted: Thu Apr 25, 2013 
10:17 am                       Site Admin                
Joined: Fri Sep 30, 2005 9:35 am
Posts: 971
Location: South Portland, Maine                timhare wrote:What do y'all 
think?  Have I become a heretic?
Yes.     
_________________
Paul Lefebvre
Developer Evangelist
Real Software, Inc.

The Real Studio Developer Conference is back: April 23rd-26th, 2013 in Orlando, 
FL.  
                             Top                Markus Winter          Post 
subject: Re: New name, time for some syntax changes?Posted: Fri Apr 26, 2013 
5:04 am                         
Joined: Sun Feb 19, 2006 4:00 pm
Posts: 1262
Location: Heidelberg, Germany                timhare wrote:What do y'all think? 
 Have I become a heretic?
Burn him!

    
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 7 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to