Skip to content

The Frendli programming language - An introductory general-purpose programming language based on studies on novices.

License

Notifications You must be signed in to change notification settings

frendlilang/jfrendli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Frendli Programming Language

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.

Table of Contents

Welcome 👋

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.

Frendli Code Snippets

Variables, Data Types, and Literals

A Frendli code snippet.

Control Flow

A Frendli code snippet.
A Frendli code snippet.
A Frendli code snippet.

Functions

A Frendli code snippet.

OOP

(paused feature, may be removed)

A Frendli code snippet.

Purpose

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.

Goals

Frendli is novice-oriented and centers around three main goals which are:

1. Be a low barrier to entry

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.

2. Facilitate conceptualization

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.

3. Be universally transitional

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.

General Characteristics

  • Text-based
  • High-level
  • General-purpose
  • Dynamically typed
  • Imperative
  • Optionally object-oriented
    • (paused feature, may be removed)
  • Interpreted

Features (v0.1)

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
  • Operators
    • Assignment
      • Bind to (=)
    • Comparison
      • Less than (<)
      • Less than or equal to (<=)
      • Greater than (>)
      • Greater than or equal to (>=)
      • Equal to (equals)
      • Not equal to (unequals)
    • Logical
      • Conjunction (and)
      • Disjunction (or)
      • Negation (not)
    • Arithmetic
      • Addition (+)
      • Subtraction (-)
      • Negation (-)
      • Multiplication (*)
      • Division (/)
    • Text
      • Concatenation (+)
    • Precedence altering
      • Grouping (())
  • Control
    • Selection
      • if
        • otherwise if
        • otherwise
    • Loop
      • Bounded (repeat times)
      • Unbounded (repeat while)
  • Functions
    • Declaration and definition (define)
      • Accept parameters ((accept a, b, c))
      • Return without explicit return value (return)
      • Return with explicit return value (return with)
    • Call a function (())
      • Send arguments ((send a, b, c))
    • Closure
  • OOP (paused feature, may be removed)
    • Classes / user-defined types
      • Declaration and definition (describe)
      • Fields
        • Declaration (has)
      • Methods
        • Declaration and definition (define) (same as function)
        • Constructor (onNew)
        • Self reference (me)
        • Call a method (same as function)
      • Single public inheritance (inherit)
        • Parent reference (parent)
    • Instances
      • Instantiation (())
      • Member (field or method) access (.)
  • Standard library
    • Functions
      • Output text to user (display)
      • Get milliseconds since epoch (time)
  • 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

Future Additions

Near to Intermediate-term

  • 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)

Runnable Sample Program

Below is a small program that is runnable using the current implementation.

  1. When timeCount() is invoked, it will time how long it takes to count from 0 to target in increments of step, while displaying the current count.
  2. If the arguments sent were valid, evaluate() is invoked to evaluate if we guessed the right number of seconds it took to count.
A Frendli code snippet.

License

This software is licensed under the terms of the MIT license.

About

The Frendli programming language - An introductory general-purpose programming language based on studies on novices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages