English Scheme abstracts data in what way?

1 reply
Goto Page
To the start Previous 1 Next To the start
Up
hilton82
User
Offline Off
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?
18.07.22 05:20:10 pm
Up
Hador
User
Offline Off
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?
Hador
To the start Previous 1 Next To the start