Re: [racket-users] [racket][draw] some APIs should be more open

2017-04-13 Thread WarGrey Gyoudmon Ju
Sorry I didn't describe my idea clearly before. Actually, in my framework (I've been writing a CSS Engine), all those objects are immutable and singular by design. The problem is, there is no way for client application to tell those primary classes "The object is already immutable". (define

Re: [racket-users] [racket][draw] some APIs should be more open

2017-04-12 Thread George Neuner
On 4/11/2017 10:41 PM, WarGrey Gyoudmon Ju wrote: This is a little awkward, there are lots of simple classes defined in racket/draw, font%, color%, pen%, brush% and so on. They just hold a group of plain data, hence opportunities to be inspected easily. However by default all classes are

Re: [racket-users] [racket][draw] some APIs should be more open

2017-04-12 Thread Matthias Felleisen
Why should fonts and colors be mutable? > On Apr 11, 2017, at 10:41 PM, WarGrey Gyoudmon Ju > wrote: > > This is a little awkward, there are lots of simple classes defined in > racket/draw, font%, color%, pen%, brush% and so on. They just hold a group of > plain

[racket-users] [racket][draw] some APIs should be more open

2017-04-11 Thread WarGrey Gyoudmon Ju
This is a little awkward, there are lots of simple classes defined in racket/draw, font%, color%, pen%, brush% and so on. They just hold a group of plain data, hence opportunities to be inspected easily. However by default all classes are opaque, the easiest (and perhaps unique) way to handle this