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

Dashboard
Notifications
Mark all as read
Q&A

What is a typeless programming language?

+3
−1

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

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

4 comments

I guess they mean that you didn't have to declare the type because you are handed a default size integer. This was at least the case of B, BCPL and very early pre-standard C. Lundin‭ 21 days ago

Where have you read that? I ask because the same word can mean different things in different contexts, so knowing the context is necessary to know what "typeless" means. (Yes, some words are so ubiquitous nearly everyone agrees on their meaning. These words usually have their own wikipedia entry. "typeless" isn't such a word). meriton‭ 21 days ago

I have edited the title because "really exists" is quite hard to answer objectively. A simple search indicates that they exist, but it is not very clear what they are. Also, it would be useful to indicate the source where you read about these languages. Alexei‭ 21 days ago

@meriton I think where I have read that is irrelevant and is an expose of personal data which I shouldn't do by principle. I thank you and Alexei for trying to help; I should try revise the question. JohnDoea‭ 21 days ago

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

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comments

Sign up to answer this question »