Programming Language Concepts - Chapter 6 (languages)

Programming Language Concepts - Chapter 6 (languages)

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

Support rectangular arrays

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (42)

Section 1

(42 cards)

Support rectangular arrays

Front

Fortran, Ada, C#, F#

Back

first high level language to provide pointers

Front

PL/I

Back

uses both and and structure type equivalence

Front

C

Back

field references have the form field_name OF record_name_1 OF ... OF record_name_n

Front

COBOL

Back

Lower bounds of an array start at 0

Front

C-based languages

Back

has tuple types

Front

ML, Python, F#

Back

support associative arrays

Front

Perl, Python, Ruby, Lua, Java, C++, C#, and F#

Back

uses malloc and free for heap allocation and deallocation

Front

C

Back

records are supported by the struct type

Front

C, C++, C#

Back

list comprehensions

Front

Python, Haskell, F#

Back

Strongly typed

Front

ML, F#, Java, C#

Back

Negative subscripts can be used

Front

Perl, Ruby, Lua

Back

records were introduced by this language

Front

COBOL

Back

structures are minor variations of classes

Front

C++

Back

structures are stack allocated value types, unlike objects, which are heap allocated

Front

C#

Back

new and delete to manage heap storage

Front

C++

Back

"exists" operator the existence of a value for a given key in the associative array

Front

Perl

Back

Arrays can grow and shrink with push and unshift

Front

Perl, Javascript

Back

provides fixed heap-dynamic arrays

Front

C-based languages

Back

associative arrays start with %, except for when accession element

Front

Perl

Back

provides safe unions

Front

Ada, ML, Haskell, F#

Back

delete operator deletes from associative array

Front

Perl

Back

can use record.field or record["field"]

Front

Lua

Back

free unions

Front

C, C++

Back

All variables are implicitly dereferenced

Front

Smalltalk, Python, Ruby, Lua

Back

A reference to nonexisting element of an array returns nil

Front

Ruby, Lua

Back

Requires range checking of subscripts

Front

C#, Java, ML, and Ada (by default)

Back

Arrays can be made to grow only through methods to add elements or catenate other arrays.

Front

Python, Ruby, Lua

Back

array names begin with @, except for when accessing elements, then $ is used

Front

Perl

Back

Records can be defined as classes

Front

Java, C#

Back

lists

Front

LISP, SCHEME, ML, F#, Python

Back

Arrays can be sparse

Front

Javascript

Back

Not strongly typed because of inclusion of union

Front

C, C++

Back

no support of coersion

Front

Ada, ML, F#

Back

Subranges are considered to be subtypes rather than types

Front

Ada

Back

no unions

Front

Java, C#

Back

discriminate union

Front

Algol >=68, Ada, ML, Haskell, F#, Pascal

Back

Chose parenthesis for array subscripts because keypunch machines did not provide brackets

Front

pre-90 Fortran and PL/I

Back

reference to nonexisting element in array returns undefined

Front

Javascript

Back

Uses dot notation

Front

C, C++, C#, Ada

Back

Lower bounds of an array start at 1

Front

Fortran

Back

Support jagged arrays but not rectangular arrays

Front

C, C++, Java

Back