yusufElnady / switchCaseModule

1 stars 1 forks source link

Move away from stringy code ? #2

Open shakram02 opened 6 years ago

shakram02 commented 6 years ago

developers love having auto completeion when typing code, supplying the case in a string doesn't make that possible, What do you think?

I think function pointers might be useful

yusufElnady commented 6 years ago

I think that the "case" keyword is so short, that I think the developer won't mind losing the function of auto-complete in the switch statement, yet I'm going to try to do that. Thanks for the suggestion, and I'm sorry for the late reply!

P.S : I now uploaded the version where you can use multiple variables in the statement, but you have to place the variables in a dictionary, and you have to place it as the first parameter in the function.

shakram02 commented 6 years ago

Never mind the latency :grin:, You can get the values of the variables as shown here in Ragai's Pull Request What about working on top of that to make your improvements ? Full PR

shakram02 commented 6 years ago

What about making your own programming language, make it include switch cases and make it compatible with python? You'll learn lots of stuff.

In case your up to it, I recommend Stanford's material;

Mathematical foundations of computing is a pre-requisitie here, That is the core of computer science. you namely need parts about Finite Automata, Grammar and Regular expressions (note that the website lectures are ordered as a stack :grimacing:). This is a very neat youtube playlist that contains those topics

Then this is the Compilers course website and here is their online course. You don't need to pass by all the stages (namely just lexing and parsing), but it's worth going through. Have fun! @yusufElnady @RagaiAhmed My basic idea ( you'll probably find a better one ) is that you'll create sort of a top layer that will take the script and parse it using your new syntax, convert it to python code then pass it to the Python interpreter You can always ask me if you need some hints or call me +201148424331

RagaiAhmed commented 6 years ago

@shakram02 for sure we will start those courses :+1: Thanks Alot :heart: