Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove: remove System.Math #851

Closed
wants to merge 2 commits into from
Closed

Conversation

Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Dec 31, 2023

This pr follows #836

@shargon
Copy link
Member

shargon commented Jan 1, 2024

I don't understand why

@cschuchardt88
Copy link
Member

why support math when you have to convert everything to a integer (BigInteger). You can have overflows. Try fitting a 256-bit integer into a int16.

@Jim8y
Copy link
Contributor Author

Jim8y commented Jan 1, 2024

why support math when you have to convert everything to a integer (BigInteger). You can have overflows. Try fitting a 256-bit integer into a int16.

improper convert will have exceptions, no overflow will happen.

@Jim8y
Copy link
Contributor Author

Jim8y commented Jan 1, 2024

I don't understand why

Cause you will have two Math in the system, one with Pow, another doesnt. With Neo.Math, it is precisely clear what is supported by neo, what is not, while using System.Math is a mass cause you can not only use double in the smart contract, you dont know what methods are supported, what are not.

@Jim8y
Copy link
Contributor Author

Jim8y commented Feb 11, 2024

Hey shargon, I still insist removing the system Math, otherwise you will have to deal with the System.Math's double types in contract. I can ban the use of System.Math with contract analyzer, and help developers to directly use Neo.Math instead of System.Math.

* master: (28 commits)
  Reduce notifications (neo-project#888)
  Core optimize optimizer (neo-project#887)
  print-stack (neo-project#873)
  ZipArchive use utf8; simplify GetOperandString
  [Compiler] move expressions out of convert file. (neo-project#882)
  misc refactor
  Zip and Unzip methods for files only
  add optimize test
  add debug notify into contract (neo-project#872)
  [Compiler: Add]verify the NEP11 and NEP17 standards while compile them. (neo-project#881)
  [Compiler: Comment] add comment to initial value (neo-project#880)
  refactor
  move to folder `Optimizer`
  optimizer to remove unused instructions
  [Framework: Add] Define Standard Enum (neo-project#877)
  Fix: Fix dependency (neo-project#876)
  create seperate test contracts (neo-project#868)
  fix-nep11token (neo-project#874)
  add comments to statements (neo-project#875)
  move neo-core projects into a dependency folder to make it clear. (neo-project#871)
  ...

# Conflicts:
#	src/Neo.Compiler.CSharp/MethodConvert.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants