uqbar-project / wollok

Wollok Programming Language
GNU General Public License v3.0
60 stars 16 forks source link

Model an Interval object for real (double, float) numbers #738

Closed fdodino closed 8 years ago

fdodino commented 8 years ago

It should have start, end, and step. It should offer this methods:

It is not enumerable since they are infinite numbers. You can not implement a forEach method.

npasserini commented 8 years ago

Why step? I see an interval as a continous set of (real) numbers.

On Tue, Jun 14, 2016 at 6:38 PM, Fernando Dodino notifications@github.com wrote:

It should have start, end, and step. It should offer this methods:

  • contains(e)
  • random()

It is not enumerable since they are infinite numbers. You can not implement a forEach method.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uqbar-project/wollok/issues/738, or mute the thread https://github.com/notifications/unsubscribe/AEa1Oa2294Oj1Mi-28sGW4fhZ6kcHF45ks5qLtkbgaJpZM4I1hVt .

tesonep commented 8 years ago

It should be in the Math namespace, once the package is fixed.

fdodino commented 8 years ago

Ok, no step since it doesn't make sense if not enumerable. Didn't understand what "Math namespace" is, are you referring to wollok.lang xtend package?

tesonep commented 8 years ago

I was just saying to put it in the wollok.math package, or something like that, nothing really important.