What is a lightweight class?

Asked

Viewed 90 times

3

I am looking for a concise explanation for this question a while ago. What I found were confusing and didactic texts.

  • 1

    Could you put one or more references to where you saw this term being used?

  • Reference http://www.swi-prolog.org/pldoc/doc_for?object=section%28%27packages/pl2cpp.html%27%29 section 2 Overview

  • Show the texts that explain the term. Who knows reading them I can produce a text better than you can understand.

  • This text is an approximate translation of the link I left above: "The most useful area to explore C++ features is type conversion. Prolog variables are dynamically typed and all information is passed on by using the term_t type. In C++, term_t is incorporated into the lightweight Plterm class. Manufacturers and operator definitions provide flexible operations and integration with major C types (char *, wchar_t *, long and double)."

  • @Christopher Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?

1 answer

1

As far as I know there is no clear and universally accepted definition of what this term means.

Some people might say it’s a POD (Plain Old Data) where the data are roughly arranged in a manner compatible with the format adopted by C.

Others may say that they are classes with a very short size and that they can be copied more easily instead of being passed as a reference. OR could still be one that does not have a virtualization table, although less likely.

In certain contexts there may be a specific explanation.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.