preparing for const, final, and invariant
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Sat May 19 10:15:29 PDT 2007
bobef wrote:
> Do you think that any user cares about if you use consts in your code or not? This is what I mean when I talk about usability. We write applications not code. We should focus on the usability. If it is easier to write - good, but the application is what is important, no the code (yes, of course it matters too). Plus what consts are you talking about in C++? Just cast them to void* and back to the type without const... If you want to modify it nothing is stopping you, if not just don't do it :)
>
No, I don't think users care if I use const. I do think they care if the program runs
quickly and is stable -- both of which const contributes to, by avoiding unnecessary
copies of data and pre-empting bugs before they happen. Yes I can use trickery and break
the type system to get around it -- but if I'm doing that, there's probably something
wrong with the design to begin with. This /is/ aiding library writers, and app writers.
Once this is done, hopefully the major issues will be the next to get attention.
I really don't think the console is going away anytime soon. A friend recently needed a
new log parsing utility. The one we tossed together in an afternoon in D, on the console,
finished within minutes -- compared to the old (GUI) app he'd been using that took hours.
GUI isn't always a blessing. (All this program even need as input was a filename.
Adding GUI to something like that is merely bloat and slowdown.)
Usability is important, I agree. But software that's quick and easy to write, is also
quicker and easier to /make/ usable. And GUI isn't always the answer to usability.
That's my stance in a tiny overly restrictive nutshell. (Walnut? Maybe pecan...)
-- Chris Nicholson-Sauls
More information about the Digitalmars-d-announce
mailing list