|
 |
Warp escreveu:
> nemesis <nam### [at] gmail com> wrote:
> No, data hiding is seen as "limited" by self-taught hackers who don't
> know jack s**t about programming. Those people just can't understand what's
> the idea, and want everything to be accessible.
It's not because it's accessible that it is going to be used. It is
only accessible because the implementation didn't care to bother putting
loads of chains and belts and bureaucratic measures that are there only
for the sake of bad programmers who can't understand the concept of
interfaces and have to have their knees broken so they can't jump the fence.
For people who know it better, the lack of such measure does not mean
irrestrict access to things, it simply means less stupid typing to make
the compiler happy. Modularity is conserved.
> I enjoy being able to create modules which I can safely improve later
> without the fear of breaking existing code.
Why would you fear breaking your own modular code with clear interface?
Are you yourself using things you shouldn't? Why are you blaming the
implementation then?
> Increased productivity... until the day that you actually need to heavily
> change some module because of new requirements or improvements, and you end
> up breaking thousands of lines of code which are carelessly using public
> members as they please.
It's all about scope. If it's public, it should be used. If it's not,
you shouldn't.
Scheme/Lisp has no problem with any of that though. First because of
lexical scoping: if you need to use an accessory function, you can
simply declare a local lambda in the outer function and no outside
functions will reach it. Second, because modules are truly modules and
though you may declare many functions, you only explicitely export some
of them. And functions not exported are truly not exported, you can't
reach them, using whatever dirty hacks you wish.
Post a reply to this message
|
 |