Frendli is an open-source general-purpose programming language intended for learning and teaching programming. It is designed around empirical data on difficulties and misconceptions held by novice programmers.
👉️ Frendli and its docs are in active development.
- Welcome
- Frendli Code Snippets
- Purpose
- Goals
- General Characteristics
- Features (v0.1)
- Future Additions
- Runnable Sample Program
- License
Hey there!
Welcome to the Frendli
programming language for learning and teaching programming. It is still in active development, but you'll find a quick glimpse of it below.
(paused feature, may be removed)
Frendli was developed to address the frequent challenges experienced by novice students. Simply put, to create a friendlier language.
It is intended for use in the beginning stages of introductory programming courses, helping the student conceptualize and start programming with minimal friction, and thereafter transitioning early or mid-course to a different established language.
The syntactic and semantic design is based on published studies on novices in introductory programming courses at universities. The studies revealed numerous factors that can be exploited in language design to facilitate learning to program.
Frendli was originally developed as part of the thesis Designing an Introductory Programming Language Based on Studies on Novices.
Frendli is novice-oriented and centers around three main goals which are:
Subgoal: Be easy to use and understand.
Since first-time programmers are the intended primary users of the language, lowering the barrier of entry and alleviating initial hurdles is important.
This means*:
- Producing fewer encountered difficulties and misconceptions.
- Minimizing interference of syntax and time fixing syntax errors.
- Being more intuitive and less ambiguous.
- Having consistency between syntax and semantics.
- Being less challenging for non-native English speakers.
Subgoal: Illustrate what constructs do through their syntax.
Misconceptions are very common among novices and often arise from the syntax itself (see article). Frendli's goal is therefore to help the user conceptualize.
This means*:
- Having syntax that is more self-explanatory.
Subgoal: Be a useful tool for teaching introductory programming and concepts.
Allowing easier transition into multiple (i.e. universally) languages not only helps the student, but provides a realistic alternative for more educational institutions in terms of efficiently incorporating it into their existing programs, especially in combination with being useful for teaching.
This means*:
- Not forcing the use of entity terminology specific to Frendli.
- Having less syntactic and conceptual conflict with the other languages.
- Being less programming language dependent for reading and reasoning.
- Being pedagogically easier to focus on fundamental concepts.
* Compared to other languages used in introductory university courses.
- Text-based
- High-level
- General-purpose
- Dynamically typed
- Imperative
- Optionally object-oriented
- (paused feature, may be removed)
- Interpreted
Implemented features are marked as completed.
- Data types
-
number
(-2
,0
,10.5
) -
text
("Hello Frendli Programmer!"
) -
boolean
(true
,false
) -
empty
-
- Single-line comments (
//
) - Lexical scope
- Variables
- Declaration (
create
) - Assignment (
change
) - Dynamic typing
- Declaration (
- Operators
- Assignment
- Bind to (
=
)
- Bind to (
- Comparison
- Less than (
<
) - Less than or equal to (
<=
) - Greater than (
>
) - Greater than or equal to (
>=
) - Equal to (
equals
) - Not equal to (
unequals
)
- Less than (
- Logical
- Conjunction (
and
) - Disjunction (
or
) - Negation (
not
)
- Conjunction (
- Arithmetic
- Addition (
+
) - Subtraction (
-
) - Negation (
-
) - Multiplication (
*
) - Division (
/
)
- Addition (
- Text
- Concatenation (
+
)
- Concatenation (
- Precedence altering
- Grouping (
()
)
- Grouping (
- Assignment
- Control
- Selection
-
if
-
otherwise if
-
otherwise
-
-
- Loop
- Bounded (
repeat times
) - Unbounded (
repeat while
)
- Bounded (
- Selection
- Functions
- Declaration and definition (
define
)- Accept parameters (
(accept a, b, c)
) - Return without explicit return value (
return
) - Return with explicit return value (
return with
)
- Accept parameters (
- Call a function (
()
)- Send arguments (
(send a, b, c)
)
- Send arguments (
- Closure
- Declaration and definition (
- OOP (paused feature, may be removed)
- Classes / user-defined types
- Declaration and definition (
describe
) - Fields
- Declaration (
has
)
- Declaration (
- Methods
- Declaration and definition (
define
) (same as function) - Constructor (
onNew
) - Self reference (
me
) - Call a method (same as function)
- Declaration and definition (
- Single public inheritance (
inherit
)- Parent reference (
parent
)
- Parent reference (
- Declaration and definition (
- Instances
- Instantiation (
()
) - Member (field or method) access (
.
)
- Instantiation (
- Classes / user-defined types
- Standard library
- Functions
- Output text to user (
display
) - Get milliseconds since epoch (
time
)
- Output text to user (
- Functions
- Error reporter
- Initial error messages (not yet “friendlified”)
- Provide highly user-friendly (and novice-friendly) error messages
- REPL (interactive prompt)
- Provide separate grammar to allow omitting the newline character
- Array/list data structure
- Extended standard library
- I/O operations (e.g. reading keyboard input)
- Data type checking
- Data type casting
- Arithmetic operators (e.g. modulus)
- Control statements (e.g. terminate execution of a loop)
Below is a small program that is runnable using the current implementation.
- When
timeCount()
is invoked, it will time how long it takes to count from0
totarget
in increments ofstep
, while displaying the current count. - If the arguments sent were valid,
evaluate()
is invoked to evaluate if we guessed the right number of seconds it took to count.
This software is licensed under the terms of the MIT license.