[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ::scr usability, languages and apis
Simon Winstow:
> On Thu, Nov 15, 2001 at 06:31:18PM -0000, Simon Kinahan said:
> > Your examples above are good examples of this: the second class for each
> > thing ends in "-able", which is a sure sign of an interface.
>
> So veering wildly back to my (semi) original point - what makes a language
> good to program. Ignoring 'power' for the moment are natural languages
better
> than ones which constrain you? Is OO a better paradigm than procedural?
Hard question ... The most important thing to me is to be able to write in
the language of the application domain I'm thinking in. So when I'm doing
GUI programming, I want to think about widgets and layout and events, not
pixels and thread synchronization. When I'm writing client code, I want to
think about the application logic, not floating point and decimal numbers.
And so on ...
OO does give you some of this, though there are other ways to do it, and it
does depend on just what language you're using. C++ seems to constantly
divert your attention onto the language mechanics. Java has this jarring
difference between the syntax of the core language and the syntax of
user-defined types. The purest OO languages - like Smalltalk, do get quite
close, though they're not perfect.
> Should a language try and be 'useable' or is that just introducing a layer
of
> complexity in the compiler that's unnecessary and generally making it
> difficult to maintain stuff?
Sometimes there is a difference between what is good for the person writing
the code, and what is good for those who'll have to maintain it. This is, I
think, a problem Perl has more than any other language. Because "there's
more than one way to do [anything]", if you're not very familiar with the
language, it can be hard to understand other people's code. In "there's One
True Way" languages like Java and Pascal (is this true of Delphi ?), reading
other people's code is very easy (though I'm better than most people at
reading code, so I may have an over-optimistic view here), because you
recognise the recurring patterns that need to be used to do certain things.
I suspect this is why there's a lurking assumption in the "IT press" that
Perl is hackers language, and Java is for "Real Software Engineers".
> [ the PC-losering story ]
The interesting thing about that story is that in some way the Unix
philosophy seems to have been right, in spite of making the user's life more
difficult. Windows NT and Java have arguably succeeded in spite of similar
(worse ?) problems.
The thing that is most important, in my view, is true of both solutions: the
semantics of both interfaces, including the possible errors cases and what
needs to be done to handle them, is clearly defined.
Simon