<html><head></head><body><div dir="auto">Cedron,<br><br></div>
<div dir="auto">I see we agree on most things, I also like the Python (or even C) way to see strings as character arrays.<br><br></div>
<div dir="auto">I also agree that source size is not a good way to measure code efectivity or efficiency; at the same time, I like code readability.<br><br></div>
<div dir="auto">Regards,<br></div>
<div dir="auto">zxMarce.<br></div>
<div class="gmail_quote" >On Apr 27, 2019, at 12:32, Cedron Dawg <<a href="mailto:cedron@exede.net" target="_blank">cedron@exede.net</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="blue">Separate email because I don't want to hijack the originating thread.<br><br>I just added a PrintAt(R,C,String) method to my NiceTerm class.  I was going to do it originally, but I don't really have a problem with using two statements.<br><br><personalRant><br>Lines of code is not a good metric for either code complexity or code efficiency.<br></personalRant><br><br>I've seen programmers reduce "lines of code" by calling external routines, which in turn, load tons of baggage code, actually take longer to execute, and add an external dependency just to avoid writing a few lines of code that would do the same task.<br><br>I've also seen programmers who overload statements with incredibly complex calculations which would be much more clear if they introduced a few temporary variables and broke the calculation into a few lines.  Coding for clarity and coding for fewest number of lines are often conflicting goals.  I strongly favor the former.<br><br>I happen to like Left, Right, and Mid as they are, but I also like Python's approach of treating strings as character arrays and having range specification capability in subscripting.  That is very similar to the Sinclairean syntax you noted.<br><br>In fact, I would really like to see Gambas adopt the Python range specification convention for all arrays.  This includes negative values for wraparound specifications.  <br><br>I wrote NiceTerm because I want to develop a bunch of console apps and I really don't like ncurses.  So this isn't merely nostalgic, these are issues for consideration today.<br><br>Ced<br><br><br><hr><br><personalRant><br><br>Personally, I always hated the awkward Microsoftean way to LOCATE things to PRINT. Two statements? Why?<br><br>Instead, always loved the british Sinclairean way, which uses:<br><br>PRINT AT <line>, <column><br><br>Simple, elegant, shorter, it has it all... and even looks more VT100 oriented, where you put coordinate/color/etc. codes right before the payload. Same way to handle attributes (color, etc):<br><br>PRINT AT 3, 10; INK 7; PAPER 0; FLASH 1; INVERSE 0; BRIGHT 1; OVER 0;"Hello world."<br><br>Could go on with replacing the also Microsoftean LEFT$, RIGHT$ and MID$ abominations with the simpler and more readable Sinclairean syntax<br><br>VAR$(<startIndex> TO <endIndex>)<br><br>but enough nostalgia trip...<br><br></personalRant><br><br>ZXMarce.<br><hr><br><br>----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----<br></pre></blockquote></div></body></html>