Crazyinfin8
Crazyinfin8
I have some ideas I want to share. ```js switch (expr) { | _: System.print("value is a different number (This is default case)") // Alternative default case | default: System.print("alternative...
I think one of the things I hoped switch statements should do was optimize itself for list of numbers so it isn't checking every option like an if-else ladder. because...
> I don't understand the point of the `|` as a separator, parsing wise at best it serve as a separator for blocks but it fells out off place for...
Also I might add, having the pipe character precede case values may make it easier for the single pass compiler to tell that this is a start of a new...
> In all the case `_` as default is not an option since it is a valid member variable name. Ah true, I guess if we are putting expressions in...
One thing I wasn't sure was whether `ObjString*.value` is always null-terminated so there were plenty of added checks to verify that I'm not incrementing past the string provided (although I...
The other thing is where `readNumber` takes a parser, it calls `lexError` when it fails while `Num.fromString` returns null when it fails. I could probably pass in a function or...
> As an example, the following number will throw an error (incorrectly) in your parser: > > ``` > 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 > ``` hmm my build seems to parse that number...
I do have a new idea to make one function that both `Num.fromString` and `readNumber` can use instead of writing duplicate code but I am also wondering in which file...
> Missed what you do with the exponent. But you still have rounding problems. Try with `6.631236871469758276785396630275967243399099947355303144249971758736286630139265439618068200788048744105960420552601852889715006376325666595539603330361800519107591783233358492337208057849499360899425128640718856616503093444922854759159988160304439909868291973931426625698663157749836252274523485312442358651207051292453083278116143932569727918709786004497872322193856150225415211997283078496319412124640111777216148110752815101775295719811974338451936095907419622417538473679495148632480391435931767981122396703443803335529756003353209830071832230689201383015598792184172909927924176339315507402234836120730914783168400715462440053817592702766213559042115986763819482654128770595766806872783349146967171293949598850675682115696218943412532098591327667236328125E-316`, for example. Again, this behaves just like how the old parsing method did...