Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8280365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:39:06+00:00 2026-06-08T09:39:06+00:00

In other words, what makes a language pure? For example, Smalltalk is considered to

  • 0

In other words, what makes a language pure?

For example, Smalltalk is considered to be a purely object-oriented language. Haskell and Lisp are arguably known to be purely functional languages.

When we say pure, does that mean they’re not capable of other programming paradigms (which is far from the truth) or does it mean they were designed to be used in that “purely” X paradigm?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:39:08+00:00Added an answer on June 8, 2026 at 9:39 am

    The word pure has different meanings in different contexts.

    Functional Programming

    When people talk about Haskell being a pure language, they mean that it has referential transparency. That is, you can replace any expression with its value without changing the meaning of the program. For example, in Haskell:

    square :: Int -> Int
    square x = x * x
    
    main = print (square 4)
    

    the expression square 4 can be replaced with its value (16) without changing the meaning of the program. On the other, hand, in this Java code:

    public int square(int x) {
        System.out.println("Done!");
        return (x*x);
    }
    
    public static void main(String [] args) {
       System.out.println(square(4));
    }
    

    you can’t replace square(4) with its value (16) because it would change the meaning of the program – it would no longer print Done! to stdout. In Haskell it is impossible for functions to have side effects like printing to stdout or changing memory locations, so referential transparency is enforced.

    Note that with this meaning of pure, Lisp is not a pure functional language, as its functions can have side effects (if you want to get picky, Haskell isn’t a pure functional language because of the existence of unsafePerformIO, but everyone knows that you are consigned to one of the nastier circles of hell if you ever use that function).

    Of course, it is always possible to adopt a pure style in an impure language, and many programmers will do this in order to make reasoning about their programs easier. It’s just that referential transparency isn’t enforced by the compiler, as it is in a pure language.

    Examples of purely functional languages include Haskell, Clean and Miranda. Examples of impure functional languages include OCaml, F# and Scheme.

    Object Oriented Programming

    When people talk about Smalltalk or Ruby being a pure object-oriented language, they mean that there is no distinction between objects and primitive values. In Smalltalk and Ruby, values like integers, booleans and characters are also objects, in the sense that they can receive messages (Smalltalk) or have methods (Ruby). For example, you can do

    1.to_s
    

    in Ruby, i.e. call the method of the integer 1 that converts it to a string. Compare this with an ‘impure’ OO language like Java, in which there are objects (which are instances of classes, and can have methods, etc) and primitive values (e.g. int, double, bool, which can’t have methods).

    When an OO language is pure, people often say that “everything is an object”, which isn’t strictly true (for example, an if statement isn’t an object) but is is true to say that “every value is an object”.

    Examples of pure object oriented languages include Ruby and Smalltalk. Examples of impure object oriented languages include Java and C++.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Or, in other words, how to make this work: function foo(){} //do something that
In other words, if it returns 200, print True. Else, False. How can I
In other words, given a base class shape and a derived class rectangle :
In other words, I have a string like: anything, escaped double-quotes: \, yep anything
In other words, can I do something with a volatile variable that could not
In other words, if I fill two unordered_map , or unordered_set , objects with
In other words, is there a way to rewind it to the beginning? EDIT
In other words, when I do nnet(...) I can use the size parameter to
In other words what's the difference between onclick=myFunction() and onclick=JavaScript:myFunction()
I'm trying to make resque work with heroku. It works with my other application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.