Posts: 4,647
Threads: 1,494
Joined: Sep 2016
SyntaxError: 'return' outside function
IMHO, they should have made return outside of a function be allowed and do the same as exit().
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
(May-26-2018, 09:53 PM)micseydel Wrote: I'm very glad it's a syntax error because it's so much more likely to be an accident than intentional. If you actually want to exit, you can just call exit.
conceptually, i just want to go back to where i came from. if i had designed computer languages "end" would not have been paired with "begin". it would have been a run time directive. it would have ended whatever it was in.
ok, ok, it's my C/assembly thinking where the return/goback things really were the same in the main program. main is just a function.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
i certainly am trying to think python for python code. but i also have done the "design a programming language" thing and that co-routine still like to run in my head. i know i can never get rid of it, much like i still do "think like C" because i still code in C. i've pretty much ended most of my assembly code but i do still run into it for many architecture from ARM (BE and LE) to S/370 (haven't done any new S/390 instructions, yet, and hope not to). last i did was SPARC stuff.
the only major change i've made is going from "rewrite all bash scripts into python" to "i'll have a mix of python and bash". but i am making a few things in python to use in bash. i have not decided what i will do with pike, yet, but i have not coded anything in pike for about 6 years. between C and python, there is no gap for pike. for someone that is dead set against blocking code by indentation i'll tell them to do java or pike.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.