Re: Last Element Reference

new topic     » goto parent     » topic index » view thread      » older message » newer message

> From: Al Getz <Xaxo at aol.com>
> Subject: RE: Last Element Reference
> 
> Hi again Igor,

Hi Al,

> Surely you jest to the second power?   smile)

No, I just do not like the '$' sign as
a name for the last element of given sequence  ;)

Yes, it has some meaning, S - sequence - and a 
vertical line(s) as a sign of an end, 
but dollar is dollar, nothing more.
 
There is the special character - vertical line.
And there may be the special key word in Euphoria,
say, 'eos' - end of sequence, or 'les' - last element 
of sequence, or something else.

Or just old good EU's 'end'. Why not, really?

> I agree with a lot of what you say, but i just dont like
> the idea of using "|" as the end-of-sequence reference char.

But I do like this idea because of some senses
of the '|' sign - similar to 'l' 
(the first letter of the 'last' word),
may mark the ends of different nature,
used as math symbol for limits of integral,
so to say, it is the sign for the end of all ends,
last line.

> Do you honestly think that a single character is worth
> linking a specific editor or editor function for the sole
> purpose of making it blink?

This is a question of taste. But customised
blinking may be useful for some key words
in some cases. 
For example, as a powerful reminder.
In my version of ed editor, which I use
with unlimited alphabet interpreter,
the error message is bright white and
blinking.

> Really, think about it.
> Yes, in the trace screen Rob could make it blink, fur sure,
> but what about in the myriad of editors out there that dont?

If you do not want blinking then do not use it.
If you want to see some thing without any doubt
then make it blinking.

> You certainly have some good ideas though, dont get me wrong.

Thanks.

> I never thought of making it blink myself, but then i also
> thought that sort of thing went out with the console editors?

I prefer the console editors for my work.
I use ed, edit.com, far - this is the
console command shell for Windows, the excellent
advanced functional copy of the Norton Commander,
with ftp, local net and many other very powerful
features.

> Perhaps a certain color...but what i found out in just the last
> few days is that there still isnt a set color scheme for
> certain things, so it's better not to depend on things like
> that for syntax but rather go by the older rules of using
> something that isnt related to it yet--unless of course
> you have complete control over the color scheme--which none
> of us does in this case.
> Also, you might recall a similar syntax ($) used in asm
> (although not exactly the same).
> 
> It's really not a bad idea if you give it a chance.
> 
> When it comes time to debug your program, i bet you will
> be happy that you can psychologically understand the character
> "$" faster then you can "|" because it doesnt look like 
> a lower case l or the numeral '1'.


Oh, yes, the '$' sign is very well visible. ;)
One can sleep and see $$$$$$$$, say, M$.


> As for your saying that it SHOULD look like an 'L' because
> it means the 'last' character, that has nothing to do with it.
> The main reason is because you might also choose a variable
> named 'l'.
> How fast can you read this:
> 
> s=s[1..l]&s[2..|]&y[|-1..9-|]
> 
> Now try this:
> 
> s=s[1..$]&s[2..$]&y[$-1..9-$]
> 
> Then try this:
> 
> s=s[1..$$]&s[2..$$]&y[$$-1..9-$$]
> 
> You comments now?


Too many $$$$$$$$, I want to grab them all for myself ;P


> I think the double $ sign is faster to read, but ill
> accept the single $ sign too, and after all, it's one
> less char to type.
> 
> 'end' bites, just like 'fin' for reason stated in
> other posts.


Yes, but the '|' sign is under your and my fingers
near the Enter key.


> So far my choices are, in order of pref:
> 
> [1]  "$$"
> [2]  "$"
> [3]  (none)
> [$$+1000000]  "|"     smile
> 
> 
> I would like to hear your comments...


Al, I prefer to do the following things just now:


--- code
atom EoS
type sequence_with_EoS(object a)
  if sequence(a) then
     EoS = length(a)
         if EoS then return 1
                else return 0 end if
                else return 0 end if
end type

sequence_with_EoS  XxXx_EoS
                
XxXx_EoS = "Euphoria is clear programming language!"
puts(1, XxXx_EoS)

? EoS
---- end of code

Then earn $1000000 of MicroMoney :)

Do you see, standard Euphoria wants more
available characters in its alphabet
and loadable key words and special characters ?

> Take care for now,
> Al

Good luck with $$$$$$$$!

Regards,
Igor Kachan
kinz at peterlink.ru
-----------------

> Igor Kachan wrote:
> > 
> > 
> > Hello Al,
> > 
> > [snipped]
> >  
> > >Hello Igor,
> > 
> > >Surely you jest smile
> > 
> > >"|" has got to be the worst choice.
> > >It looks too much like other things.
> > 
> > Just use red blinking color for this 
> > special sign of a some future Euphoria 
> > syntax, then it will be as a stop signal  blink
> > 
> > >In some fonts it may be very hard to tell the
> > >difference between "|" and the capital i and
> > >lower case L.
> > 
> > Good, it is the 'Last' element, why not to be
> > similar the lower case L ?
> > 
> > >Also, it's used in mathematics to indicate
> > >absolute value:
> > >x=|a|   --"take the absolute value of 'a' "
> > >so it functions almost the same as parenthesis,
> > >brackets and braces, to enclose something else.
> > 
> > Good, this is a vertical line with the top and
> > bottom limits of integral, do you see -- limits?
> > L again.
> > 
> > >This means it looks too strange when inserted 
> > >between [ and ] like this:
> > >s=s[|]
> > 
> > Imagine, this line is red and blinking!
> > 
> > Cooollll !  Do you see 'llll'?
> > L again.  Last element !
> > 
> > >To a person familiar with math, this looks incomplete.
> > >Can you tell me it's clearer then
> > >s=s[$]  ?
> > 
> > When I see $ I think about the next month
> > payment for my apartment, not about math,
> > programming and Euphoria   %-(
> > 
> > >I dont think so.
> > 
> > Think, think, please ....
> > 
> > I hate basic and pascal now for 
> > these perpetual 
> > %%%%% $$$$$$ @@@@@@ ^^^^^^^ !!!!!!! 
> > #####  .....
> > 
> > !@#$%^&*  -- do you know this word ?
> > 
> > I think, this word is invention of
> > one basic/pascal/c  programmer. 
> > 
> > >On the other hand, the "$" signs only other use
> > >is with money (dollars) where it's context is
> > >very easily distinguished from a sequence reference,
> > >plus it dosnt look much like anything else except
> > >the capital letter "S", but yet not close enough to
> > >be confused too easily.
> > 
> > Red blinking ...
> > 
> > Or let us define this letter:
> > 
> > last element ##
> > 
> > last element @@
> > 
> > last element $$
> > 
> > Why not?
> > 
> > Interpreter is just about 100K.
> > Let us add 100K.
> > 
> > >Even more readable but harder to type would be the
> > >double dollar sign:
> > 
> > >s=s[$$]
> > 
> > >How about:
> > 
> > >s=s[ch]
> > 
> > Why not?
> > 
> > (I have corrected your letter just
<snip>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu