On 22/08/2014, at 5:44 PM, srean wrote:

> The syntax is too wordy :(
> I would rather have an 'extra' ';' than all that finger typing.

Ok, noted .. I can do both actually :)
Of course .. be nice to hear that from an actual user .. :)

> Also it would be neat to have
> 
> for i in [start, end)
> for i in [start, end]
> 
> I just noted m4 macros have mismatched square brackets and finger_nail 
> parenthesis, so it would not be the first time.

That's not on, it would defeat tools that can't parse felix but can match 
brackets.
However this issue is still to be resolved.

The syntax

        first .. last

is suggestive. Strings use s.[first to last] but first and last here can 
also be negative. Also s.[first to] and s.[to last] where the missing
value is the string length and 0 respectively.


> 
> Rather than checking: successor(i) < bound 
> which has the problem successor might not be defined, 
> couldnt one generalize the test: i < predecessor(bound).

Nope, because there mightn't be a predecessor either :)

> BTW how often does the successor undefined happen in real instances.

Often enough to be wary, just like 0 iterations.

For example:

        for var ch:uint8 in 0u upto 255u do ..

A stronger example:

        for i in 7 do 

where 7 is a type.  Would happen with fixed length arrays all the time.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to