All pastes #505133 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-23 13:05 UTC
rendered paste body
23/5/2007 05:52:14 PM: wats the diff between a adt and a class
23/5/2007 05:52:45 PM: ?
23/5/2007 05:52:49 PM: adt is a concept
23/5/2007 05:52:53 PM: a class is an implementation
23/5/2007 05:52:54 PM: ?
23/5/2007 05:53:09 PM: i can implement a stack adt na ? :-/
23/5/2007 05:53:13 PM: without a class
23/5/2007 05:53:34 PM: how?
23/5/2007 05:54:10 PM: hmm dont remeber the syntax right now.. but im sure asiro taught implem of adt in C
23/5/2007 05:54:20 PM: hmm well yeah ok
23/5/2007 05:54:27 PM: but it isnt an ADT in the true sense
23/5/2007 05:54:32 PM: there is no encapsulation in C
23/5/2007 05:57:03 PM: well?
23/5/2007 05:57:10 PM: cant i just say an ADT is just the structural programming equiv of class ?
23/5/2007 05:58:11 PM: well ?
23/5/2007 05:58:20 PM: no
23/5/2007 05:58:24 PM: ADT is a concept
23/5/2007 05:58:43 PM: structures, classes, etc are tools for implementing  this concept
23/5/2007 05:59:31 PM: alright.. see this from wiki.. In object-oriented parlance, an ADT is a class; an instance of an ADT or class is an object.
23/5/2007 05:59:36 PM: wat do u think abt this
23/5/2007 05:59:42 PM: right
23/5/2007 05:59:55 PM: in C++ ADTs are implemented using Classes
23/5/2007 06:00:01 PM: so ? we *call* ADT's as classes in oo paradigm
23/5/2007 06:00:10 PM: its like saying dog in english and hindi
23/5/2007 06:00:44 PM: in oo *parlance* ADT *is* a class.. not implemented as classes
23/5/2007 06:01:16 PM: implented using classes
23/5/2007 06:01:17 PM: not as
23/5/2007 06:01:23 PM: actually anything
23/5/2007 06:01:29 PM: my phrasing is probably wrong
23/5/2007 06:01:39 PM: but do you get the difference i am trying to point out?
23/5/2007 06:02:04 PM: sorta
23/5/2007 06:02:17 PM: an ADT simply means a set of functions and DS on which the functions can be applied
23/5/2007 06:02:31 PM: the functions should define the only way of interacting with the intenal DSs
23/5/2007 06:02:41 PM: yeah
23/5/2007 06:02:42 PM: so much so that the entire ADT looks like a DS to the user
23/5/2007 06:02:50 PM: thats fine
23/5/2007 06:05:04 PM: no da i think u cant call it a ADT once u enter the oo paradigm.. u change over to classes when u r there
23/5/2007 06:05:14 PM: again
23/5/2007 06:05:21 PM: a class but a tool to implement ADTs
23/5/2007 06:06:58 PM: ok if u can say classes as implems, then suppose i have an abstract class called tree which is inherited by BinaryTree, AVLTree classes.. then wats the ADT here 
23/5/2007 06:07:16 PM: u can say tree adt here cuz the tree class is itself not implemented
23/5/2007 06:07:19 PM: *cant
23/5/2007 06:07:34 PM: you are not catching my vibration
23/5/2007 06:07:41 PM: the ADT is Binary Tree
23/5/2007 06:07:49 PM: it is defined using the tree Class
23/5/2007 06:09:31 PM: hmmm
23/5/2007 06:10:59 PM: then why does wiki say so ? i mean.. translate it as it is.. in OO parlance.. which is like saying in english language.. ADT is a class.. which is like saying "naai" is "dog"
23/5/2007 06:11:14 PM: so in english language naai is dog
23/5/2007 06:11:38 PM: i dont see what you are getting at
23/5/2007 06:11:42 PM: seems clear enough to me
23/5/2007 06:12:03 PM: its like saying THe same word in diff langs illa.. and hence u cant differentiate between them
23/5/2007 06:12:10 PM: see its like asking wats the diff between naai and dog
23/5/2007 06:12:26 PM: your analogies are all wrong
23/5/2007 06:12:36 PM: ADT is a much wider topic than classes
23/5/2007 06:12:41 PM: ADT is theoretical CS
23/5/2007 06:12:49 PM: dude yes da i get ur pt
23/5/2007 06:12:55 PM: classes is an ADT tool used in OO
23/5/2007 06:13:01 PM: but just explain wat that sentence as such means
23/5/2007 06:13:34 PM: i dont know
23/5/2007 06:13:35 PM: i dont care
23/5/2007 06:13:49 PM: that isnt logical
23/5/2007 06:13:58 PM: good for you
23/5/2007 06:14:12 PM: hmmph
23/5/2007 06:14:34 PM: u dont like to argue and analyse do u.. just yell ur pt, stamp your foot and walk away
23/5/2007 06:14:56 PM: no use arguing at someone who repeats the same thing again and again
23/5/2007 06:15:03 PM: i explained it to you
23/5/2007 06:15:07 PM: and you dont read what i said
23/5/2007 06:15:09 PM: and i said i got it
23/5/2007 06:15:16 PM: good
23/5/2007 06:15:19 PM: so case closed?
23/5/2007 06:16:20 PM: ur explanation is fine da.. u have answered the original qn.. but that sentence isnt clear still.. it actually doesnt agree with what u say
23/5/2007 06:16:40 PM: where does it not agree
23/5/2007 06:17:28 PM: ok just tell me the meaning of in object oriented parlance, adt "is" class.. 
23/5/2007 06:17:54 PM: dont u feel that its like saying dog replaces naai in eng ?
23/5/2007 06:18:01 PM: dog *is* naai
23/5/2007 06:18:07 PM: in C++ talk ADTs are nothing but classes
23/5/2007 06:18:08 PM: ?
23/5/2007 06:18:12 PM: yeah
23/5/2007 06:18:18 PM: and?
23/5/2007 06:19:00 PM: ADT's *are* classes da.. which is to say there is no ADT when u talk abt classes and vice versa
23/5/2007 06:19:13 PM: its like s/ADT/class/g
23/5/2007 06:19:23 PM: no ADT ll be there
23/5/2007 06:19:29 PM: in C++? yes
23/5/2007 06:19:31 PM: yes
23/5/2007 06:19:37 PM: in C? no
23/5/2007 06:19:42 PM: agreed
23/5/2007 06:19:43 PM: in Python? Yes
23/5/2007 06:19:46 PM: in Lisp? no
23/5/2007 06:19:52 PM: fine
23/5/2007 06:19:55 PM: so what is your point?
23/5/2007 06:20:26 PM: so if u can say i replace ADT with class in OO paradigm, why cant i say they are equivalents ?
23/5/2007 06:20:38 PM: in diff paradigms
23/5/2007 06:20:49 PM: because ADT is implementation free?
23/5/2007 06:21:04 PM: adt means the same thing irrespective of what language you are taklng about?
23/5/2007 06:21:46 PM: its like when you say `tar' you mean an app which can create and extract tar balls... but i have different implementations of tar
23/5/2007 06:21:53 PM: GNU, Apple, Plan9, Sun
23/5/2007 06:21:54 PM: etc
23/5/2007 06:23:20 PM: so u still say ADT is a concept and it is implemented in diff paradigms.. in OO paradigm its implem is class
23/5/2007 06:23:29 PM: yes
23/5/2007 06:24:48 PM: wat i say (going by that senetnce alone) is .. class is also a concept and it *is*(not implem of) OO's equivalent of ADT
23/5/2007 06:25:07 PM: ok i dont agree
23/5/2007 06:25:57 PM: but class is a concept in OO right ?
23/5/2007 06:26:06 PM: yes