[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dev-serveez] binary data type
From: |
Martin Grabmueller |
Subject: |
[dev-serveez] binary data type |
Date: |
Fri, 20 Jul 2001 08:41:37 +0200 |
Hello all,
I am just looking at the new binary data type for Guile in Serveez and
have some notes about it (of course these are just suggestions):
- I think `binary-search' should return #f instead of -1, because that
is how it is done in string searching procedures, and because it is
more useful. Then you can use the result directly in `if's without
comparing it to another number:
(let ((idx (binary-search b1 b2)))
(if idx
(format "found at: ~a.~n" idx)
(format "not found~n")))
- Maybe `binary-set!' should also support exact numbers as the last
argument?
- `binary-concat' should be `binary-concat!' because it has a side
effect on the binary argument.
- What about making the last argument to `binary-subset' an optional
argument? That would mean:
(binary-subset b start end) -> binary of b's data from `start' to `end'
(binary-subset b start) -> binary of b's data from `start' to the end
of the binary
That would be more schemey, too.
If you agree with one or more of the above suggestions, I can help
implementing them, of course. Just drop me a note.
Best regards,
'martin
- [dev-serveez] binary data type,
Martin Grabmueller <=
- Re: [dev-serveez] binary data type, stefan, 2001/07/20
- Re: [dev-serveez] binary data type, Martin Grabmueller, 2001/07/23
- Re: [dev-serveez] binary data type, stefan, 2001/07/24
- Re: [dev-serveez] binary data type, stefan, 2001/07/27
- Re: [dev-serveez] binary data type, Martin Grabmueller, 2001/07/28
- Re: [dev-serveez] binary data type, stefan, 2001/07/28
- Re: [dev-serveez] binary data type, Martin Grabmueller, 2001/07/30