This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
43 lines (32 loc) · 1.73 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Copyright (C) 2010 Brandon Lewis
Introduction
Goof is an experimental functional language with a novel implementation. It is
a library of functions and macros which combine to create the illusion that
you are writing in a high-level language. Despite this, goof programs are C
programs. They are compiled and executed like any other.
Don't be fooled into thinking it's efficient: Goof is essentially a dynamic
language, with the runtime implemented directly in C.
Goof programs are expressed as nested calls to functions and macros. Each
function returns a pointer to an object which implements a language contruct.
Known Downsides (or, "Why in God's name are you doing this?")
- I just wrote it over the weekend for fun
- No memory management at present
- Dynamic implementation is probably inefficient
- I am largely ignorant of how concurrency might affect this system
- Possibly difficult to debug, and syntax erros are difficult to resolve due
to the heavy abuse of preprocessor macros.
Potential Upsides
Though I acknowledge that this is really a pretty terrible thing to do to an
unsuspecting C programmer, I feel that there might be certain useful features
of this approach that are worth exploring. In addition to the well-known
advantages of functional programming, goof might offer the following:
- educational value
- small implementation
- easy to add new constructs to the language
- easy to inter-operate between C and goof
- requires nothing other than a C compiler (after removing the glib code)
- you potentially mix and match different semantics within the same executable
(e.g. applicative versus normal order, eager versus strict, allow
non-deterministic evaluation etc).
Liscence
Goof is available under LGPL v3