[Pharo-dev] , for vector creation
nicolaihess at gmail.com
Thu Oct 26 01:00:57 EDT 2017
Am 25.10.2017 10:50 PM schrieb "Torsten Bergmann" <astares at gmx.de>:
there might be reasons for an own 2D vector class (instead of using Point).
But still I dislike the reimplementation of "," because for me so far it
has the meaning of "concatenating things".
Like concatenating coordinates :-)
Here you redefine it to create vector instances and it works only up to
so far. Right?
I understand that this gives some similarities with the math notation (1,2)
but I personally would prefer to use:
1 at 2 asVector
or Vector2D x: 1 y: 2
> Gesendet: Mittwoch, 25. Oktober 2017 um 20:06 Uhr
> Von: "Tudor Girba" <tudor at tudorgirba.com>
> An: "Pharo Development List" <pharo-dev at lists.pharo.org>
> Betreff: [Pharo-dev] , for vector creation
> As mentioned in the separate thread, we played with introducing the
> , aNumber
> ^ BlVector2D x: self y: aNumber
> This means that (10,20) will return a 2D vector.
> We also have (10,20,30) which returns a 3D vector.
> , is used for different meanings already in the image beside the
collection concatenation. For example, in FileReference is adds a file
extension. And Exceptions create a collection. In other packages,
PetitParser uses it as a sequence operator.
> Please voice your concerns.
> "Every thing should have the right to be different."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev