What are the origins of the Public/Private function declarations?

The Question

What are the origins of the Public/Private function paradigm?

Background

A question came up in chat about Header files in C, and their usage being mainly to help the compiler, not the programmer. It’s my understanding though, that this is the first usage of the concept of “Private” functions, or functions which aren’t prototyped in the header file. Had C not used header files to declare functions, would we still have the current concept of Public and Private functions as seen in C# or Java? Or was this concept initially developed elsewhere and simply implemented in the C Header/Source scheme

Private/public comes from the original OO language, Simula, which predated C by a few years. According to the Wikipedia article, the original concept was first implemented in the TOPS/10 variant of Simula, and was integrated into the core language standard in 1987. It doesn’t say when TOPS/10 Simula was first created, though, so it may or may not have been earlier than C.

Regardless, even if C and its header file system had not been around, modern programming languages would still have inherited the concept of encapsulation through the private/public system from Simula.

1

I think the idea of making parts of your code private has roots which goes further back than Simula. Scheme (1975) was the first language to implement closures, which gives you the possibility to encapsulate data such as lambdas. Schema also lets you specify internal functions using the define keyword.

Making functions private allows more abstraction to be incorporated into a program. Building abstractions in programs has a long history, with LISP-variant languages such as Scheme contributing a lot to the development of modern programming languages.

Structure and Interpretation of Computer Programs by Abelson, Sussman is an excellent book to learn more about abstractions if you are interested in those things.

0

‘Modula’, by Niklaus Wirth, hastily added the concept of modules to a Pascal derived language around 1975-1976. His paper on it was published in 1976.
However, he quickly focused on ‘Modula-2’ in 1977 and stopped work on Modula.

Modules had the concept of public and private symbol declarations.

He was influenced by ‘Mesa’ from his time at Xerox PARC (1976-1977). Mesa was a derivative of Pascal designed for systems programming. It had the module concept.
In his paper (linked below), he also mentions that the module concept could also be seen as an implementation of the Abstract Data Type concept by Liskov in 1974.

UCSD Pascal added this to Pascal as ‘interface’ and ‘implementation’ around 1978.
Everything in an interface was ‘public’ and everything in the ‘implementation’ was private to that module.

Simula added this concept later in the 1980’s to classes. C++ as well added public and private in the 1980’s.

A great account of Wirth’s thoughts is from his History of Programming Languages (HOPL) paper “Modula-2 and Oberon” from June 2005.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật