[Grace-core] On numbers and objects
Kim Bruce
kim at cs.pomona.edu
Tue Nov 9 18:27:23 PST 2010
If we are worried about overloading +, then to avoid the use of = as anything other than comparison, we could use "be" for definitions:
let x be 17
let y:Num be 3.45
Continue to use := with assignments, and then use = only for equality testing.
Just a suggestion.
Kim
On Nov 9, 2010, at 5:24 PM, James Noble wrote:
>> I would strongly favour =.
>
> OK...
>
>> Event though it is different from pointer equality, the whole point is that this is Grace's definition of *equality*. There should not be equality AND egal -- equality should BE egal.
>
> absolutely!!
>
>> And I think it's time to clean up the == nonsense.
>
> OK. Apart from compatibility/legibility (which *is* important)
> "==" looks less like ":=" than plain "=" does.
>
>> (That then gets into conflict with using = for let definitions -- I would favour dropping the distinction between = for let and := for var.
>
> hmm, they're there as a relic from an earlier design where they keywords weren't required (or worked differently)
>
>> That's a detail where language design detail hits through to the detriment of usability.
>> It's technically sensible, and provides little useful purpose in practice.)
>
> the thing is the assignment operator is (currently design as) ":="
> I guess lets could also use ":=" - is that your suggestion?
> Although we've flirted with using = Scala/ML style in function definitions,
> it will look odd there going to ":="
>
> there are no perfect choices!
>
>> We should mark each comment line as a comment, so we need only to-the-end-of-line comments.
>
> Hm: again, I'd like to see the design of annotations before finishing things here.
> Annotations won't necessarily sense with end-of-line syntax.
>
>> And applying block comments becomes an IDE function, not a language construct.
>
> of course.
>
>> What I would like to see, though, is a differentiation between interface (documentation) comments and internal (implementation) comments.
>
> again, we need to look more at this, there's certainly at least one
> blog-posts's-worth in comments (& annotations)
>
> J
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core
More information about the Grace-core
mailing list