Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

What is a typeless programming language?

+3
−3

I have read that several programming languages, listed below are considered "typeless":

  • Forth
  • Brainfuck
  • B
  • MUMPS
  • BLISS
  • Lucid
  • BCPL

I have shared this data with a programmer who clued that such languages don't lack a type, rather, they lack a type system;
They do have one type which is byte size per ASCII character with which one could create data types (I guess he meant --- as we know them from say, JavaScript).

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

General comments (4 comments)

1 answer

+9
−0

‘This language doesn't have types’ and ‘This language only has one type’ are English sentences that communicate the same underlying concept: a typeless language doesn't have a way to distinguish categories of values from each other, either statically (before running the program) or dynamically (while running the program).

It's not entirely clear to me, but you or that person might be conflating types (which are categories of values) with data structures (which are arrangements of data in memory that can store values). Basically all programming languages have data structures, because all programming languages need to represent values in some way if they want to have any practical use. How types interact with the data structures supported by the language will vary.

It sounds like you're familiar with JavaScript, so here's how that language breaks down: JavaScript has dynamic types, which is the feature that makes it possible for the language to throw a friendly error if you try to use a number as if it were a function. If JavaScript had static types, it would be possible for the language to tell you before it even starts running that your program tries to use a number as if it were a function. If JavaScript were truly typeless, using a number as a function would probably result in some random part of memory being ‘executed’, which would immediately crash the entire process. But even a hypothetical typeless JavaScript would let you create numbers and functions and objects and arrays that contain each other; those are data structures. The categories that the language groups them into, statically or dynamically, are types. If the language treats all values equally, it's typeless.

(A type system usually refers to the rules for how types are defined, checked, and related to each other. A language with types has a type system, even if it's an extremely basic one defining a fixed set of types which are not related in any way to each other. But more powerful type systems allow for complex types and complex rules for judging whether a program uses values of those types correctly. As a matter of terminology, whether we say a language ‘has types’ or ‘has a type system’ depends only on where we want to put emphasis: on the types themselves, or on the ways they interact and get checked.)

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »