Forum

> > Off Topic > Scheme abstracts data in what way?
Forums overviewOff Topic overviewLog in to reply

English Scheme abstracts data in what way?

1 reply
To the start Previous 1 Next To the start

old Scheme abstracts data in what way?

hilton82
User Off Offline

Quote
In a statically typed language, users can abstract data and produce constructors using algebraic data types, or they can deal with data abstraction using class, trait, and mixin.

Users can access a class system in dynamically typed languages such as Python and Ruby.

But how can scheme, the simplest functional language and the closest to -calculi, abstract data?

Is it common for scheme programmers to just put data in a list or a lambda abstraction and then build some accessor function to make it appear like a tree or anything else? as stated by EOPL: data specification through interfaces.

Then, what is the relationship between this abstraction approach and abstract data types (ADT) and objects?

old Re: Scheme abstracts data in what way?

Hador
User Off Offline

Quote
I've never worked with Scheme itself, only one of its derivatives, but data abstraction is pretty straightforward, as outlined here:

http://mngu2382.github.io/sicp/chapter2/00-notes01.html

Or for classes (in a way I find not dissimilar to JavaScript):
https://homes.cs.aau.dk/~normark/prog3-03/html/notes/oop-scheme_themes-classes-objects-sec.html

As far as I'm aware, trees are just nested lists.

What is your use case for data structures in Scheme?
I thought it was just a language taught to first-years at Uni to better explain concepts like recursion, so I'm guessing this is for some kind of homework?
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview