Forums

break from if

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: break from if

Postby kobi7 » Fri Feb 14, 2014 1:45 am

Thanks guys, you are both right.
nerdzero is correct that it is a style issue. I used languages before where there was only one return statement
which helped in refactoring code.
hopscc, thanks for your inventiveness in implementation, I never thought of the while loop. (would "post while false" work?)
a block keyword could be a valuable thing I guess, need to see in practice.

I forgot, is there an ability to write syntax macros in cobra?
then we can see if some ideas add to clarity (by seeing them in action)

I used in the past, a language called factor, it has been mostly abandoned since its author was hired by google.
it's something of an object oriented modern forth, with some functional style but not the mathematic turnoff kind.
syntax in postfix (vast majority), and arguments are passed implicitly on the stack (data flow). has some support for macros, and very concise. it had some functions (data combinator words) that wouldn't be easy to express in a "normal" language.
it's a language for obsessive refactorers :-))

so, I guess I feel more comfortable with stretching the limits of flexibility.
The language was working for me, except I felt it lacked structure, and gui and deployment were problematic or not easy.
Falun Dafa is Good.
Truth, Compassion, Forbearance is Good.
kobi7
 
Posts: 82
Location: Israel

Previous

Return to Discussion

Who is online

Users browsing this forum: No registered users and 108 guests

cron