Author Topic: Functions Example  (Read 5378 times)

0 Members and 1 Guest are viewing this topic.

Charles Pegge

  • Guest
Re: Functions Example
« Reply #15 on: September 27, 2011, 05:05:56 AM »
We humans take our reading skills for granted :)

Parsing for Basic is easily under estimated. Oxygen has 6 different functions just for reading words in different contexts and then a further 2 which include identification and macro expansion.

Handling operators, brackets and punctuation is the next challenge after quotes.

Charles

kryton9

  • Guest
Re: Functions Example
« Reply #16 on: September 27, 2011, 01:05:57 PM »
I think you made Oxygen to flexible Charles. It will probably be better in the end to make it more restricted to get consistency on using parenthesis, equality, pointers and references. Right now there are too many ways to do things. Since C is understood by oxygen. I would use the C way.
>     greater than              5 > 4 is TRUE
<     less than                 4 < 5 is TRUE
>=    greater than or equal     4 >= 4 is TRUE
<=    less than or equal        3 <= 4 is TRUE
==    equal to                  5 == 5 is TRUE
!=    not equal to              5 != 4 is TRUE

no := at all.

Require parenthesis for functions, subs and methods. It also makes it easy to differentiate between these and just plain variables.  myFunction(1,2,3),  mySub(),  myMethod(), str(value)

For Pointers:  only * would be used for pointer and & for reference, I know Basics use @ but they don't read C and @ is nicer to look at, but since oxygen reads C I would not use @.

I think these hard set rules would eliminate the little bugs that pop up and must make parsing a nightmare.

Charles Pegge

  • Guest
Re: Functions Example
« Reply #17 on: September 27, 2011, 02:32:35 PM »

Hi Kent,

Logic prevents me from going any further along the path of flexibility :)

But I would like to retain what we have so far since it makes a big difference for light-duty programming, which is what originally made Basic so popular among scientists and engineers.

For more substantial projects, I think we have to provide tools which take care of all the lower aspects of coding, like layout, naming, parameter matching and syntax. That is why I am very interested to see how command-menu programming works out. Also the concepts of 'Intentional Programming' championed by Charles Simonyi.

Charles