Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is file-based source code?

Tags:

ruby

smalltalk

In the book "Programming Ruby" it says that ruby has file-based source code.

Take a true object-oriented language, such as Smalltalk. Drop the unfamiliar syntax and move to more conventional, file-based source code. [...] You end up with Ruby.

http://docs.ruby-doc.com/docs/ProgrammingRuby/

What does it mean for a language to have file-based source code?

like image 594
KanyeWezt Avatar asked Apr 08 '17 23:04

KanyeWezt


People also ask

What is file source code?

Source code is generally understood to mean programming statements that are created by a programmer with a text editor or a visual programming tool and then saved in a file. Object code generally refers to the output, a compiled file, which is produced when the Source Code is compiled with a C compiler.

What is an example of source code?

Source code is the language or string of words, numbers, letters and symbols that a computer programmer uses. An example of source code is someone using HTML code to create a screen.

What is source code base?

A codebase (sometimes spelled as two words, code base) is the complete body of source code for a given software program or application. Source code is the version of a program that a programmer writes and saves as a file.


1 Answers

It means that source code is based on files. In the Intentional Domain Workbench, for example, there is no source text; the source is a Semantic Tree and is stored in a database, not files. In Smalltalk, there is no source text either; Classes and Methods are objects like any other object and are stored in the Garbage-Collected Object Memory like any other object – the Object Memory is then serialized to disk (and read back) similar to how RAM is serialized to disk when your computer goes into hibernation, the program actually never ever stops running, instead you edit the live objects in the system while the system is running. (LISP is similar.)

In Ruby, whenever the program stops, everything is thrown away, and when the program starts, everything is built up again. The file is "dead", it does not consist of live objects. When you edit the program, you edit a "dead" file, not the live system. That's what "file-based source code" means.

like image 153
Jörg W Mittag Avatar answered Oct 02 '22 21:10

Jörg W Mittag