Skip to content

Conversation

@Ashvin-Ranjan
Copy link
Contributor

@Ashvin-Ranjan Ashvin-Ranjan commented Aug 28, 2022

Updating the JS branch to the newest standard, it will be labeled as v0.1.0 after this!

Things to add:

  • operators
    • XOR
    • Update not equal
    • >> and <<
      • >>> and <<< perhaps?
    • in
    • Indexing
    • Allow | to be used for defaulting
    • Allow ~ to indicate if a maybe is null
    • .. spread operator
      • spread with functions
  • loops
    • while
    • continue
    • break
    • Remove old for loop
  • else if
  • FileIO
    • writeBytes
    • appendBytes
    • readBytes
    • getFiles
    • Make all of the return types responses instead so that errors can be passed
    • Make relative to the file that calls it
  • SystemIO
    • sendSTDOUT
  • request
    • Combine all functions into one request.request
    • createServer
  • times
    • getTime
  • websocket
    • createServer
  • mutex
    • new
    • tryAccess
    • access
    • read
    • write
  • Functions
    • toFloat
    • printWithEnd
    • subsection
    • parallel
    • intoModule
    • getUnitTestResults
  • Update record syntax to use ,
  • Update enum syntax to be more similar to function syntax
  • Change function syntax
    • Change function type syntax
  • Add internal traits
    • Test all internal traits
  • Update var syntax
    • Allow indexing in var syntax
  • Add in new test/update old ones

@Ashvin-Ranjan
Copy link
Contributor Author

I have actually had a dilemma over whether the function type syntax needs to be changed.

For some background, when we originally decided to change the function type syntax @SheepTester was opposed to it, as the function syntax represents how functions actually are. In the python version this was harder to notice, but in the compiled JS code it is easy to see how something like:

sum(1, 2)

is actually compiled to [1]:

sum(1)(2)

So it seems better to have the function type be int -> int -> int vs (int, int) -> int as you are not really putting in a tuple, but calling the function one argument at a time.

Any thoughts on the matter would be appreciated.

[1]: Note that this is not the exact compiled code but just a simplified representation of how it goes down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants