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

Reconsider numeric literals #340

Open
treeowl opened this issue Feb 18, 2018 · 1 comment
Open

Reconsider numeric literals #340

treeowl opened this issue Feb 18, 2018 · 1 comment

Comments

@treeowl
Copy link

treeowl commented Feb 18, 2018

I know Frege is not supposed to be the same as Haskell, but I urge you to reconsider treating numeric literals so differently, for purely practical reasons. It seems to me that the way Frege handles them will make it quite annoying to write libraries that compile under both Frege and GHC. I personally suggest using something at least as general as the following:

###Non-negative integer literals

Handle these with a Semiring class.

###Negative integer literals

Handle these with a Ring class.

###Fractional numbers

Handle these with a Field class.

@Ingo60
Copy link
Member

Ingo60 commented Mar 16, 2018

I am sure you're having good intentions, and, BTW, I'd love to have a mathematical sound number class system. As well as Rationals, Complex and maybe even esoteric but fascinating things like Continued Fractions.

So, if you or someone else comes up with a proposal with flesh on the bones, or even with a POC implementation, you'll be very welcome. But as it stands, I am like: Ok, David threw 3 Buzzwords. Very interesting.

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

No branches or pull requests

2 participants