procedural-programming


Procedural Programming and data exposure


Is it fair to say that the following statement is not exactly correct, considering that in procedural programming you can have local scope?
"In procedural program, data is exposed to the whole program whereas in OOPs program, it is accessible with in the object and which in turn assures the security of the code."
(I'm a student and I was asked this question at an interview for an internship)
I agree with Mark, the part that isn't exactly correct is the "assures the security of the code".
An Object Oriented language is, under the hood, doing the same thing a procedural language could be doing: hide type definitions and then pass a pointer to a struct containing data vs. using a global. An example is C's pthreads library, which uses opaque types to prevent users of the API from modifying internal data structures. (Opaque just means the struct is defined in a private header, so the user can't see inside it without pointer tricks.)
But data security? No, because you can still use pointers to peak inside opaque structs and even to inspect data on the stack. This works in C++ too. A hacker can still attempt to examine a program's memory too (debugger, core dump, other tricks).

Related Links

PHP: One large file or several small files
Procedural Programming and data exposure
Difference between Declarative and Procedural Programming?

Categories

HOME
xml
eclipse
fabricjs
localization
api
apache-jena
github-for-windows
css3
battery
fftw
solver
vscode-extensions
appcelerator
opendj
bitbucket-api
seo
edge
vxml
pyqt4
missing-data
barcode
performancepoint
google-schemas
appcelerator-studio
emoji
line
cmdb
flash-player
altera
event-sourcing
shortest-path
sse
lilypond
roslyn
hta
scriptella
interbase
custom-post-type
8051
nsurl
python-2.6
testbed
dynamic-jasper
arduino-ide
least-squares
apic
salesforce-communities
sharp-snmp
configurationmanager
activeperl
dt
mach-o
jtree
vibrate
juice-ui
stripe-connect
chromium-os
qtplugin
myspace
neon
turbo-prolog
findfirst
assertion
dllimport
microsoft-reporting
rate-limiting
batik
iced-coffeescript
atoi
jdk1.7
alloy-ui
canvg
nutiteq
mraid
bufferedinputstream
mmwormhole
dbaccess
pseudo-class
administration
webfinger
formview
machine-instruction
tweenlite
encryption-asymmetric
reflector
xml-dsig
winginx
dot42
amslidemenu
getopt
high-resolution
hibernate-entitymanager
jammer
embedded-fonts
node-blade
css-reset
pclzip
windows-98
qtconcurrent
iboutlet
subgraph
fusefabric
urlrewriter
user-tracking
catransform3d
rmdir
multiplatform
globals
isapi-extension
opml
cfwindow
alsb
movieplayer

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile