=====
CS 111 - Week 1 Lecture 2 - 2025-08-28
=====
=====
TODAY WE WILL
=====
* announcements
* intro to DrRacket integrated development environment (IDE)
* concepts of syntax, semantics
* intro to a set of Racket data types and simple expressions
* intro to compound expressions
* prep for next class
=====
algorithm - an ordered, finite set of steps for doing something
program - an algorithm expressed in some programming language(s)
* computers tend to translate so-called high-level programming
languages into low-level operations it can perform
* when you write a program in a programming language,
you have to exact and precise, or you may not get
what you want
=====
programming environment/integrated development environment (IDE)
* a collection of programs that makes developing and
maintaining these sets of steps more reasonable
* DrRacket is an IDE for Racket (and a few other languages)
=====
SYNTAX - the rules for creating programs so they can be
translated into executable code
your program will not be able to be translated if
it does not follow the programming language syntax
SEMANTICS - the meaning of what you wrote using a programming
language
your program will not do what you hoped it would do
if it does not follow the semantics of the programming language
=====
single-line comment in Racket
its syntax:
* anything after a semicolon, up to the end of the line,
is considered a single-line comment
its semantics: it's ignored!
its purpose: to help you and other humans understand your program!
======
expression: a thing that has a value in a programming language
simple expression: the simplest kind of expression, simply expressing
a value of some data type
* the syntax for a simple expression that is a
literal simple expression
depends on the desired data type
* (a simple expression can also be a name representing a value,
as we will discuss further next week)
* here are 4 basic BSL (Beginning Student Language) Racket data types:
number
string
boolean
image
* see: the comments in today's BSL Racket in-class
examples for intros to:
* the syntax for literal simple expressions of
each of these types
* the syntax for BSL Racket compound expressions